diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 5949d86..fe2f07f 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -1,224 +1,233 @@
-import { NgModule } from '@angular/core';
-import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
-import {canActivate, redirectLoggedInTo, redirectUnauthorizedTo} from "@angular/fire/auth-guard";
-
-const redirectUnauthorizedToLogin = () => redirectUnauthorizedTo(['']);
-const redirectLoggedInToHome = () => redirectLoggedInTo(['home']);
-
-// @ts-ignore
-const routes: Routes = [
- {
- path: '',
- redirectTo: 'login',
- pathMatch: 'full'
- },
- {
- path: 'home',
- loadChildren: () => import('./pages/main_graphs/home/home.module').then(m => m.HomePageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'register',
- loadChildren: () => import('./pages/login_register/register/register.module').then(m => m.RegisterPageModule),
- ...canActivate(redirectLoggedInToHome)
- },
- {
- path: 'login',
- loadChildren: () => import('./pages/login_register/login/login.module').then(m => m.LoginPageModule),
- ...canActivate(redirectLoggedInToHome)
-
- },
- {
- path: 'myteam',
- loadChildren: () => import('./pages/myteam/myteam.module').then( m => m.MyteamPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'model-product',
- loadChildren: () => import('./pages/model_the_product/model-product/model-product.module').then(m => m.ModelProductPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'new-product',
- loadChildren: () => import('./pages/model_the_product/new-product/new-product.module').then(m => m.NewProductPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'view-product',
- loadChildren: () => import('./pages/model_the_product/view-product/view-product.module').then(m => m.ViewProductPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'show-map',
- loadChildren: () => import('./pages/latency_test/show-map/show-map.module').then(m => m.ShowMapPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'latency-test',
- loadChildren: () => import('./pages/latency_test/latency-test/latency-test.module').then(m => m.LatencyTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'latency-chooser',
- loadChildren: () => import('./pages/latency_test/latency-chooser/latency-chooser.module').then(m => m.LatencyChooserPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'latency-results',
- loadChildren: () => import('./pages/latency_test/latency-results/latency-results.module').then(m => m.LatencyResultsPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'graph-latency',
- loadChildren: () => import('./pages/main_graphs/latency_graph/graph-latency/graph-latency.module').then(m => m.GraphPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'trace-chooser',
- loadChildren: () => import('./pages/trace_test/trace-chooser/trace-chooser.module').then(m => m.TraceChooserPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'trace-test',
- loadChildren: () => import('./pages/trace_test/trace-test/trace-test.module').then(m => m.TraceTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'trace-results',
- loadChildren: () => import('./pages/trace_test/trace-results/trace-results.module').then(m => m.TraceResultsPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'show-map-trace',
- loadChildren: () => import('./pages/trace_test/show-map-trace/show-map-trace.module').then(m => m.ShowMapTracePageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'graph-data-for',
- loadChildren: () => import('./pages/main_graphs/graph-data-for/graph-data-for.module').then(m => m.GraphDataForPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'graph-trace',
- loadChildren: () => import('./pages/main_graphs/traceroute_graph/graph-trace/graph-trace.module').then(m => m.GraphTracePageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'ai',
- loadChildren: () => import('./pages/ai/ai.module').then( m => m.AiPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'flame-graph',
- loadChildren: () => import('./pages/flame_graph/flame-graph/flame-graph.module').then(m => m.FlameGraphPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'flame-graph-for',
- loadChildren: () => import('./pages/flame_graph/flame-graph-for/flame-graph-for.module').then(m => m.FlameGraphForPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'flame-graph-date',
- loadChildren: () => import('./pages/flame_graph/flame-graph-date/flame-graph-date.module').then(m => m.FlameGraphDatePageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'flame-graph-compare',
- loadChildren: () => import('./pages/flame_graph/flame-graph-compare/flame-graph-compare.module').then(m => m.FlameGraphComparePageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'software-testing',
- loadChildren: () => import('./pages/software_testing/software-testing/software-testing.module').then(m => m.SoftwareTestingPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'software-testing-chooser',
- loadChildren: () => import('./pages/software_testing/software-testing-chooser/software-testing-chooser.module').then(m => m.SoftwareTestingChooserPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'create-system-test',
- loadChildren: () => import('./pages/software_testing/system_tests/create-system-test/create-system-test.module').then(m => m.CreateSystemTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'execute-system-test',
- loadChildren: () => import('./pages/software_testing/system_tests/execute-system-test/execute-system-test.module').then(m => m.ExecuteSystemTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'board',
- loadChildren: () => import('./pages/board/board.module').then( m => m.BoardPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'view-history-system-test',
- loadChildren: () => import('./pages/software_testing/system_tests/view-history-system-test/view-history-system-test.module').then(m => m.ViewHistorySystemTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'view-system-test',
- loadChildren: () => import('./pages/software_testing/system_tests/view-system-test/view-system-test.module').then(m => m.ViewSystemTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'create-unit-test',
- loadChildren: () => import('./pages/software_testing/unit_tests/create-unit-test/create-unit-test.module').then( m => m.CreateUnitTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'settings',
- loadChildren: () => import('./pages/settings/settings.module').then( m => m.SettingsPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'create-integration-test',
- loadChildren: () => import('./pages/software_testing/integration_tests/create-integration-test/create-integration-test.module').then( m => m.CreateIntegrationTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'load-test-chooser',
- loadChildren: () => import('./pages/load_test/load-test-chooser/load-test-chooser.module').then( m => m.LoadTestChooserPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'load-test',
- loadChildren: () => import('./pages/load_test/load-test/load-test.module').then( m => m.LoadTestPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'load-test-history',
- loadChildren: () => import('./pages/load_test/load-test-history/load-test-history.module').then( m => m.LoadTestHistoryPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
- },
- {
- path: 'incident-manager-chooser',
- loadChildren: () => import('./pages/incident_manager/incident-manager-chooser/incident-manager-chooser.module').then( m => m.IncidentManagerChooserPageModule),
- ...canActivate(redirectUnauthorizedToLogin),
-
- },
{
+import { NgModule } from '@angular/core';
+import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
+import {canActivate, redirectLoggedInTo, redirectUnauthorizedTo} from "@angular/fire/auth-guard";
+
+const redirectUnauthorizedToLogin = () => redirectUnauthorizedTo(['']);
+const redirectLoggedInToHome = () => redirectLoggedInTo(['home']);
+
+// @ts-ignore
+const routes: Routes = [
+ {
+ path: '',
+ redirectTo: 'login',
+ pathMatch: 'full'
+ },
+ {
+ path: 'home',
+ loadChildren: () => import('./pages/main_graphs/home/home.module').then(m => m.HomePageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'register',
+ loadChildren: () => import('./pages/login_register/register/register.module').then(m => m.RegisterPageModule),
+ ...canActivate(redirectLoggedInToHome)
+ },
+ {
+ path: 'login',
+ loadChildren: () => import('./pages/login_register/login/login.module').then(m => m.LoginPageModule),
+ ...canActivate(redirectLoggedInToHome)
+
+ },
+ {
+ path: 'myteam',
+ loadChildren: () => import('./pages/myteam/myteam.module').then( m => m.MyteamPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'model-product',
+ loadChildren: () => import('./pages/model_the_product/model-product/model-product.module').then(m => m.ModelProductPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'new-product',
+ loadChildren: () => import('./pages/model_the_product/new-product/new-product.module').then(m => m.NewProductPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'view-product',
+ loadChildren: () => import('./pages/model_the_product/view-product/view-product.module').then(m => m.ViewProductPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'show-map',
+ loadChildren: () => import('./pages/latency_test/show-map/show-map.module').then(m => m.ShowMapPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'latency-test',
+ loadChildren: () => import('./pages/latency_test/latency-test/latency-test.module').then(m => m.LatencyTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'latency-chooser',
+ loadChildren: () => import('./pages/latency_test/latency-chooser/latency-chooser.module').then(m => m.LatencyChooserPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'latency-results',
+ loadChildren: () => import('./pages/latency_test/latency-results/latency-results.module').then(m => m.LatencyResultsPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'graph-latency',
+ loadChildren: () => import('./pages/main_graphs/latency_graph/graph-latency/graph-latency.module').then(m => m.GraphPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'trace-chooser',
+ loadChildren: () => import('./pages/trace_test/trace-chooser/trace-chooser.module').then(m => m.TraceChooserPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'trace-test',
+ loadChildren: () => import('./pages/trace_test/trace-test/trace-test.module').then(m => m.TraceTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'trace-results',
+ loadChildren: () => import('./pages/trace_test/trace-results/trace-results.module').then(m => m.TraceResultsPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'show-map-trace',
+ loadChildren: () => import('./pages/trace_test/show-map-trace/show-map-trace.module').then(m => m.ShowMapTracePageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'graph-data-for',
+ loadChildren: () => import('./pages/main_graphs/graph-data-for/graph-data-for.module').then(m => m.GraphDataForPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'graph-trace',
+ loadChildren: () => import('./pages/main_graphs/traceroute_graph/graph-trace/graph-trace.module').then(m => m.GraphTracePageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'ai',
+ loadChildren: () => import('./pages/ai/ai.module').then( m => m.AiPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'flame-graph',
+ loadChildren: () => import('./pages/flame_graph/flame-graph/flame-graph.module').then(m => m.FlameGraphPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'flame-graph-for',
+ loadChildren: () => import('./pages/flame_graph/flame-graph-for/flame-graph-for.module').then(m => m.FlameGraphForPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'flame-graph-date',
+ loadChildren: () => import('./pages/flame_graph/flame-graph-date/flame-graph-date.module').then(m => m.FlameGraphDatePageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'flame-graph-compare',
+ loadChildren: () => import('./pages/flame_graph/flame-graph-compare/flame-graph-compare.module').then(m => m.FlameGraphComparePageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'software-testing',
+ loadChildren: () => import('./pages/software_testing/software-testing/software-testing.module').then(m => m.SoftwareTestingPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'software-testing-chooser',
+ loadChildren: () => import('./pages/software_testing/software-testing-chooser/software-testing-chooser.module').then(m => m.SoftwareTestingChooserPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'create-system-test',
+ loadChildren: () => import('./pages/software_testing/system_tests/create-system-test/create-system-test.module').then(m => m.CreateSystemTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'execute-system-test',
+ loadChildren: () => import('./pages/software_testing/system_tests/execute-system-test/execute-system-test.module').then(m => m.ExecuteSystemTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'board',
+ loadChildren: () => import('./pages/board/board.module').then( m => m.BoardPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'view-history-system-test',
+ loadChildren: () => import('./pages/software_testing/system_tests/view-history-system-test/view-history-system-test.module').then(m => m.ViewHistorySystemTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'view-system-test',
+ loadChildren: () => import('./pages/software_testing/system_tests/view-system-test/view-system-test.module').then(m => m.ViewSystemTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'create-unit-test',
+ loadChildren: () => import('./pages/software_testing/unit_tests/create-unit-test/create-unit-test.module').then( m => m.CreateUnitTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'settings',
+ loadChildren: () => import('./pages/settings/settings.module').then( m => m.SettingsPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'create-integration-test',
+ loadChildren: () => import('./pages/software_testing/integration_tests/create-integration-test/create-integration-test.module').then( m => m.CreateIntegrationTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'load-test-chooser',
+ loadChildren: () => import('./pages/load_test/load-test-chooser/load-test-chooser.module').then( m => m.LoadTestChooserPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'load-test',
+ loadChildren: () => import('./pages/load_test/load-test/load-test.module').then( m => m.LoadTestPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'load-test-history',
+ loadChildren: () => import('./pages/load_test/load-test-history/load-test-history.module').then( m => m.LoadTestHistoryPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+ {
+ path: 'incident-manager-chooser',
+ loadChildren: () => import('./pages/incident_manager/incident-manager-chooser/incident-manager-chooser.module').then( m => m.IncidentManagerChooserPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+
+ },
+ {
path: 'incident-manager',
- loadChildren: () => import('./pages/incident_manager/incident-manager/incident-manager.module').then( m => m.IncidentManagerPageModule)
+ loadChildren: () => import('./pages/incident_manager/incident-manager/incident-manager.module').then( m => m.IncidentManagerPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
},
{
path: 'new-incident',
- loadChildren: () => import('./pages/incident_manager/new-incident/new-incident.module').then( m => m.NewIncidentPageModule)
+ loadChildren: () => import('./pages/incident_manager/new-incident/new-incident.module').then( m => m.NewIncidentPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
},
{
path: 'incident-details',
- loadChildren: () => import('./pages/incident_manager/incident-details/incident-details.module').then( m => m.IncidentDetailsPageModule)
+ loadChildren: () => import('./pages/incident_manager/incident-details/incident-details.module').then( m => m.IncidentDetailsPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
},
+ {
+ path: 'incident-postmortem',
+ loadChildren: () => import('./pages/incident_manager/incident-postmortem/incident-postmortem.module').then( m => m.IncidentPostmortemPageModule),
+ ...canActivate(redirectUnauthorizedToLogin),
+ },
+
+
+
+];
-
-
-];
-
-@NgModule({
- imports: [
- RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
- ],
- exports: [RouterModule]
-})
-export class AppRoutingModule { }
+@NgModule({
+ imports: [
+ RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
+ ],
+ exports: [RouterModule]
+})
+export class AppRoutingModule { }
diff --git a/src/app/interfaces/incident.ts b/src/app/interfaces/incident.ts
index edb5661..d1971e8 100644
--- a/src/app/interfaces/incident.ts
+++ b/src/app/interfaces/incident.ts
@@ -17,6 +17,12 @@ export interface Incident {
iAmIn?: boolean;
+ postmortem?: {
+ wentWrong: string;
+ canBeLearned: string;
+ howToPrevent: string;
+ }
+
}
diff --git a/src/app/pages/incident_manager/incident-details/incident-details.page.html b/src/app/pages/incident_manager/incident-details/incident-details.page.html
index 4564bb2..4090d57 100644
--- a/src/app/pages/incident_manager/incident-details/incident-details.page.html
+++ b/src/app/pages/incident_manager/incident-details/incident-details.page.html
@@ -215,7 +215,7 @@
Postmortem Culture: Learning from Failure. The postmortem is a retrospective of the incident, focusing on what went wrong, what can be learned, and how to prevent similar incidents in the future.
- Incident Postmortem
+ Incident Postmortem
diff --git a/src/app/pages/incident_manager/incident-details/incident-details.page.ts b/src/app/pages/incident_manager/incident-details/incident-details.page.ts
index 350ff21..514cf39 100644
--- a/src/app/pages/incident_manager/incident-details/incident-details.page.ts
+++ b/src/app/pages/incident_manager/incident-details/incident-details.page.ts
@@ -175,15 +175,33 @@ export class IncidentDetailsPage implements OnInit {
closeIncident() {
+ this.incidentService.closeIncident(this.orgName, this.productObjective, this.productStep, this.incident).then(async res => {
+ if (res) {
+ // navigate one step back
+ await this.router.navigate(['/incident-manager', {
+ productObjective: this.productObjective,
+ step: this.productStep
+ }]);
+ }
+ });
}
- saveChanges() {
+
+ async postmortemIncident() {
+ await this.router.navigate(['/incident-postmortem', {
+ orgName: this.orgName,
+ productObjective: this.productObjective,
+ step: this.productStep,
+ currentUser: this.currentUser,
+ incidentTitle: this.incident.title
+ }]);
}
+
/**
* Show a loading spinner.
*/
@@ -207,4 +225,5 @@ export class IncidentDetailsPage implements OnInit {
upload.value = '';
this.isImageLoaded = false;
}
+
}
diff --git a/src/app/pages/incident_manager/incident-manager/incident-manager.page.html b/src/app/pages/incident_manager/incident-manager/incident-manager.page.html
index 3dff722..e676ac7 100644
--- a/src/app/pages/incident_manager/incident-manager/incident-manager.page.html
+++ b/src/app/pages/incident_manager/incident-manager/incident-manager.page.html
@@ -19,9 +19,12 @@
{{incident.title}}
+
@if (incident.iAmIn) {
Assigned to you
}
+ Open
+
@@ -37,13 +40,20 @@ {{incident.title}}
-
+
-
{{incident.title}}
- @if (incident.iAmIn) {
-
Assigned to you
- }
+
{{incident.title}}
+
+ @if (incident.iAmIn) {
+ Assigned to you
+ }
+ @if (incident.state === 'postmortem') {
+ Postmortem
+ } @else {
+ Closed
+ }
+
diff --git a/src/app/pages/incident_manager/incident-manager/incident-manager.page.ts b/src/app/pages/incident_manager/incident-manager/incident-manager.page.ts
index 0d39d21..07f2faf 100644
--- a/src/app/pages/incident_manager/incident-manager/incident-manager.page.ts
+++ b/src/app/pages/incident_manager/incident-manager/incident-manager.page.ts
@@ -63,7 +63,7 @@ export class IncidentManagerPage implements OnInit {
async closeIncident() {
this.closeIncidents = await this.incidentService.getIncidents(this.orgName, this.productObjective, this.productStep );
- this.closeIncidents = this.closeIncidents.filter(incident => incident.state === 'closed');
+ this.closeIncidents = this.closeIncidents.filter(incident => incident.state === 'closed' || incident.state === 'postmortem');
}
@@ -135,4 +135,11 @@ export class IncidentManagerPage implements OnInit {
await this.loadingCtrl.dismiss();
}
+ goToPostmortem(incident: Incident) {
+ this.router.navigate(['incident-postmortem', {
+ productObjective: this.productObjective,
+ step: this.productStep,
+ incidentTitle: incident.title
+ }]);
+ }
}
diff --git a/src/app/pages/incident_manager/incident-postmortem/incident-postmortem-routing.module.ts b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem-routing.module.ts
new file mode 100644
index 0000000..3e67540
--- /dev/null
+++ b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem-routing.module.ts
@@ -0,0 +1,17 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { IncidentPostmortemPage } from './incident-postmortem.page';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: IncidentPostmortemPage
+ }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule],
+})
+export class IncidentPostmortemPageRoutingModule {}
diff --git a/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.module.ts b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.module.ts
new file mode 100644
index 0000000..2706b67
--- /dev/null
+++ b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.module.ts
@@ -0,0 +1,22 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { IncidentPostmortemPageRoutingModule } from './incident-postmortem-routing.module';
+
+import { IncidentPostmortemPage } from './incident-postmortem.page';
+import {ComponentsModule} from "../../../components/components.module";
+
+@NgModule({
+ imports: [
+ CommonModule,
+ FormsModule,
+ IonicModule,
+ IncidentPostmortemPageRoutingModule,
+ ComponentsModule
+ ],
+ declarations: [IncidentPostmortemPage]
+})
+export class IncidentPostmortemPageModule {}
diff --git a/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.html b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.html
new file mode 100644
index 0000000..62f51a2
--- /dev/null
+++ b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+ Postmortem for {{ incident.title }}
+
+
+
+
+
+
+
+
+
+
+
What went wrong?
+
+
+
+
+
+
+
+
+
+
+
What can be learned?
+
+
+
+
+
+
+
+
+
+
+
How to prevent similar incidents in the future?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Save and Close
+
+
+
+
+
+
diff --git a/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.scss b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.spec.ts b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.spec.ts
new file mode 100644
index 0000000..3be9ece
--- /dev/null
+++ b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.spec.ts
@@ -0,0 +1,17 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { IncidentPostmortemPage } from './incident-postmortem.page';
+
+describe('IncidentPostmortemPage', () => {
+ let component: IncidentPostmortemPage;
+ let fixture: ComponentFixture;
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(IncidentPostmortemPage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.ts b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.ts
new file mode 100644
index 0000000..c8eebb2
--- /dev/null
+++ b/src/app/pages/incident_manager/incident-postmortem/incident-postmortem.page.ts
@@ -0,0 +1,209 @@
+import {Component, inject, OnInit} from '@angular/core';
+import {ActivatedRoute, Router} from "@angular/router";
+import {LoadingController} from "@ionic/angular";
+import {IncidentService} from "../../../services/incident.service";
+import {Incident} from "../../../interfaces/incident";
+import {getGenerativeModel, VertexAI} from "@angular/fire/vertexai-preview";
+
+@Component({
+ selector: 'app-incident-postmortem',
+ templateUrl: './incident-postmortem.page.html',
+ styleUrls: ['./incident-postmortem.page.scss'],
+})
+export class IncidentPostmortemPage implements OnInit {
+
+ orgName: string = '';
+ productObjective: string = '';
+ productStep: string = '';
+ incident: Incident = {} as Incident;
+
+
+
+ wentWrong:string = '';
+ canBeLearned: string = '';
+ howToPrevent: string = '';
+
+ private vertexAI:VertexAI = inject(VertexAI);
+
+
+ constructor(
+ private router: Router,
+ private activatedRoute: ActivatedRoute,
+ private loadingCtrl: LoadingController,
+ private incidentService: IncidentService,
+
+ ) { }
+
+ ngOnInit() {
+ }
+
+ async ionViewWillEnter() {
+ this.getParams();
+ await this.getIncident()
+ }
+
+
+ getParams() {
+ this.activatedRoute.params.subscribe(params => {
+ this.productObjective = params['productObjective']; //this is the product objective
+ this.productStep = params['step']; //this is the step of the product
+ this.incident.title = params['incidentTitle'];
+ });
+ const user = JSON.parse(localStorage.getItem('user')!);
+ this.orgName = user.orgName!;
+
+ console.log(this.orgName);
+ console.log(this.productObjective);
+ console.log(this.productStep);
+ console.log(this.incident.title);
+ }
+
+ async getIncident() {
+
+ await this.showLoading();
+
+ this.incident = await this.incidentService.getIncident(this.orgName, this.productObjective, this.productStep, this.incident.title)
+
+ try {
+ this.wentWrong = this.incident.postmortem?.wentWrong!;
+ this.canBeLearned = this.incident.postmortem?.canBeLearned!;
+ this.howToPrevent = this.incident.postmortem?.howToPrevent!;
+ }catch (e) {
+ console.log(e);
+ }
+
+ await this.hideLoading();
+
+ }
+
+
+ async savePostmortem() {
+ await this.showLoading();
+ this.incident.postmortem = {
+ wentWrong: this.wentWrong,
+ canBeLearned: this.canBeLearned,
+ howToPrevent: this.howToPrevent
+ }
+
+ this.incident.state = 'postmortem';
+
+ console.dir(this.incident);
+
+ await this.incidentService.updateIncident(this.orgName, this.productObjective, this.productStep, this.incident).then(async res => {
+ if (res) {
+ await this.hideLoading();
+ await this.router.navigate(['/incident-manager', {
+ productObjective: this.productObjective,
+ step: this.productStep,
+ }])
+ }
+ await this.hideLoading();
+ })
+ }
+
+ async sendToAI(field: string) {
+ await this.showLoading();
+
+ try {
+
+
+ console.log(field);
+
+
+ let question = '';
+ let answer;
+ if (field === 'wentWrong') {
+ question = 'Ayudame a completar el Postmortem del siguiente incidente: ' + this.incident.title + '. Lo sucedido se basa en la sigueinte descripción: ' + this.incident.description + '. Esto fue '
+ ' lo que fue pasando en el incidente: ';
+ for (let i = 0; i < this.incident.report!.length; i++) {
+ question += ' ' + this.incident.report![i].comment;
+ }
+ question += ' ¿Qué salió mal?. Responde solo a esta pregunta en maximo 100 palabras';
+ }
+
+ if (field === 'canBeLearned') {
+
+ if (this.wentWrong === '') {
+ await this.hideLoading();
+ return;
+ }
+
+ question = 'Ayudame a completar el Postmortem del siguiente incidente: ' + this.incident.title + '. Lo sucedido se basa en la sigueinte descripción: ' + this.incident.description + '. Esto fue '
+ ' lo que fue pasando en el incidente: ';
+ for (let i = 0; i < this.incident.report!.length; i++) {
+ question += ' ' + this.incident.report![i].comment;
+ }
+
+ question += 'Lo que salió mal fue: ' + this.wentWrong;
+
+ question += ' ¿Qué se puede aprender sobre el incidente?. Responde solo a esta pregunta en maximo 100 palabras';
+ }
+
+
+ if (field === 'howToPrevent') {
+
+ if (this.canBeLearned === '' || this.wentWrong === '') {
+ await this.hideLoading();
+ return;
+ }
+
+ question = 'Ayudame a completar el Postmortem del siguiente incidente: ' + this.incident.title + '. Lo sucedido se basa en la sigueinte descripción: ' + this.incident.description + '. Esto fue '
+ ' lo que fue pasando en el incidente: ';
+ for (let i = 0; i < this.incident.report!.length; i++) {
+ question += ' ' + this.incident.report![i].comment;
+ }
+
+ question += 'Lo que salió mal fue: ' + this.wentWrong;
+
+ question += 'Lo que se puede aprender sobre el incidente fue: ' + this.canBeLearned;
+
+ question += ' ¿Cómo se puede prevenir que vuelva a suceder?. Responde solo a esta pregunta en maximo 100 palabras';
+ }
+
+
+ const model = getGenerativeModel(this.vertexAI, {model: "gemini-1.5-flash"});
+ answer = await model.generateContent(question);
+ console.log(answer);
+
+ if (field === 'wentWrong') {
+ this.wentWrong = answer.response.text() as string;
+ }
+
+ if (field === 'canBeLearned') {
+ this.canBeLearned = answer.response.text() as string;
+ }
+
+ if (field === 'howToPrevent') {
+ this.howToPrevent = answer.response.text() as string;
+ }
+
+ }catch (e){
+ console.log(e);
+ }
+
+
+
+ await this.hideLoading();
+
+
+ }
+
+ /**
+ * Show a loading spinner.
+ */
+ async showLoading() {
+ const loading = await this.loadingCtrl.create({
+ });
+ await loading.present();
+ }
+
+ /**
+ * Hide the loading spinner.
+ */
+ async hideLoading() {
+ await this.loadingCtrl.dismiss();
+ }
+
+
+
+}
diff --git a/src/app/services/incident.service.ts b/src/app/services/incident.service.ts
index 4884b6f..b37012b 100644
--- a/src/app/services/incident.service.ts
+++ b/src/app/services/incident.service.ts
@@ -56,6 +56,19 @@ export class IncidentService {
return [];
}
+ async getIncident(orgName: string, productObjective: string, productStep: string, incidentTitle:string) {
+ let incidents = await this.getIncidents(orgName, productObjective, productStep) as Incident[]
+ //search for the incident using the title
+ for (let i = 0; i <= incidents.length; i++) {
+ if (incidents[i].title === incidentTitle) {
+ return incidents[i];
+ }
+ }
+
+ return {} as Incident;
+
+ }
+
async updateIncident(orgName: string, productObjective: string, productStep: string, incident: Incident) {
const docRef = doc(this.firestore, 'teams', orgName, 'products', productObjective, 'incident', productStep);
@@ -80,4 +93,31 @@ export class IncidentService {
return false;
}
+ async closeIncident(orgName: string, productObjective: string, productStep: string, incident: Incident) {
+ const docRef = doc(this.firestore, 'teams', orgName, 'products', productObjective, 'incident', productStep);
+ incident.state = 'closed'
+ const docSnap = await getDoc(docRef);
+ if (docSnap.exists()) {
+ const data = docSnap.data();
+ //get the incidents array
+ // @ts-ignore
+ let dataIncident = data.incidents;
+ console.log(dataIncident);
+ for (let i = 0; i <= dataIncident.length; i++) {
+ console.log(dataIncident[i].title);
+ console.log(incident.title);
+ if (dataIncident[i].title === incident.title) {
+ console.log('found');
+ dataIncident[i] = incident;
+ await setDoc(docRef, data);
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+
+
+
}
diff --git a/www/3675.185a8c86d3ff0b7c.js b/www/3675.185a8c86d3ff0b7c.js
new file mode 100644
index 0000000..f47a07f
--- /dev/null
+++ b/www/3675.185a8c86d3ff0b7c.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3675],{5553:(f,_,c)=>{c.d(_,{h:()=>m});var r=c(177),I=c(7863),s=c(4438);let m=(()=>{var a;class n{}return(a=n).\u0275fac=function(u){return new(u||a)},a.\u0275mod=s.$C({type:a}),a.\u0275inj=s.G2t({imports:[r.MD,I.bv]}),n})()},3241:(f,_,c)=>{c.d(_,{p:()=>m});var r=c(4438),I=c(177),s=c(7863);let m=(()=>{var a;class n{constructor(u){this.location=u,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(a=n).\u0275fac=function(u){return new(u||a)(r.rXU(I.aZ))},a.\u0275cmp=r.VBU({type:a,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(u,h){1&u&&(r.j41(0,"ion-header",0)(1,"ion-toolbar"),r.nrm(2,"ion-menu-button",1),r.j41(3,"ion-icon",2),r.bIt("click",function(){return h.goBack()}),r.k0s(),r.j41(4,"ion-title"),r.EFF(5),r.k0s()()()),2&u&&(r.Y8G("translucent",!0),r.R7$(5),r.JRh(h.title))},dependencies:[s.eU,s.iq,s.MC,s.BC,s.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),n})()},8453:(f,_,c)=>{c.d(_,{W:()=>s});var r=c(4438),I=c(7863);let s=(()=>{var m;class a{constructor(){this.title="Title"}ngOnInit(){}}return(m=a).\u0275fac=function(g){return new(g||m)},m.\u0275cmp=r.VBU({type:m,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(g,u){1&g&&(r.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),r.EFF(3),r.k0s()()()),2&g&&(r.R7$(3),r.JRh(u.title))},dependencies:[I.hU,I.ln]}),a})()},3675:(f,_,c)=>{c.r(_),c.d(_,{IncidentManagerPageModule:()=>E});var r=c(177),I=c(4341),s=c(7863),m=c(7650),a=c(467),n=c(4438),g=c(4624),u=c(8453),h=c(3241);function M(o,d){1&o&&(n.j41(0,"ion-chip"),n.EFF(1," Assigned to you"),n.k0s())}function v(o,d){if(1&o){const l=n.RV6();n.j41(0,"ion-item",8),n.bIt("click",function(){const t=n.eBV(l).$implicit,i=n.XpG();return n.Njj(i.goToIncident(t))}),n.j41(1,"ion-label",9)(2,"div",10)(3,"h2"),n.EFF(4),n.k0s(),n.j41(5,"div"),n.DNE(6,M,2,0,"ion-chip"),n.j41(7,"ion-chip",11),n.EFF(8,"Open"),n.k0s()()()()()}if(2&o){const l=d.$implicit;n.R7$(4),n.JRh(l.title),n.R7$(2),n.vxM(6,l.iAmIn?6:-1)}}function C(o,d){if(1&o){const l=n.RV6();n.j41(0,"ion-chip",8),n.bIt("click",function(){n.eBV(l);const t=n.XpG().$implicit,i=n.XpG();return n.Njj(i.goToIncident(t))}),n.EFF(1," Assigned to you"),n.k0s()}}function P(o,d){if(1&o){const l=n.RV6();n.j41(0,"ion-chip",13),n.bIt("click",function(){n.eBV(l);const t=n.XpG().$implicit,i=n.XpG();return n.Njj(i.goToPostmortem(t))}),n.EFF(1," Postmortem"),n.k0s()}}function O(o,d){if(1&o){const l=n.RV6();n.j41(0,"ion-chip",14),n.bIt("click",function(){n.eBV(l);const t=n.XpG().$implicit,i=n.XpG();return n.Njj(i.goToIncident(t))}),n.EFF(1," Closed"),n.k0s()}}function j(o,d){if(1&o){const l=n.RV6();n.j41(0,"ion-item")(1,"ion-label",9)(2,"div",10)(3,"h2",8),n.bIt("click",function(){const t=n.eBV(l).$implicit,i=n.XpG();return n.Njj(i.goToIncident(t))}),n.EFF(4),n.k0s(),n.j41(5,"div"),n.DNE(6,C,2,0,"ion-chip")(7,P,2,0,"ion-chip",12)(8,O,2,0),n.k0s()()()()}if(2&o){const l=d.$implicit;n.R7$(4),n.JRh(l.title),n.R7$(2),n.vxM(6,l.iAmIn?6:-1),n.R7$(),n.vxM(7,"postmortem"===l.state?7:8)}}const T=[{path:"",component:(()=>{var o;class d{constructor(e,t,i,p){this.router=e,this.activatedRoute=t,this.loadingCtrl=i,this.incidentService=p,this.productStep="",this.productObjective="",this.orgName="",this.openIncidents=[],this.closeIncidents=[]}ngOnInit(){}ionViewWillEnter(){var e=this;return(0,a.A)(function*(){yield e.showLoading(),e.getParams(),yield e.getOpenIncidents(),yield e.closeIncident(),yield e.getMyOpenIncidents(),yield e.getMyClosedIncidents(),yield e.hideLoading()})()}getParams(){this.activatedRoute.params.subscribe(t=>{this.productObjective=t.productObjective,this.productStep=t.step});const e=JSON.parse(localStorage.getItem("user"));this.orgName=e.orgName,console.log(this.orgName),console.log(this.productObjective),console.log(this.productStep)}getOpenIncidents(){var e=this;return(0,a.A)(function*(){e.openIncidents=yield e.incidentService.getIncidents(e.orgName,e.productObjective,e.productStep),e.openIncidents=e.openIncidents.filter(t=>"open"===t.state)})()}closeIncident(){var e=this;return(0,a.A)(function*(){e.closeIncidents=yield e.incidentService.getIncidents(e.orgName,e.productObjective,e.productStep),e.closeIncidents=e.closeIncidents.filter(t=>"closed"===t.state||"postmortem"===t.state)})()}getMyOpenIncidents(){var e=this;return(0,a.A)(function*(){const t=JSON.parse(localStorage.getItem("user"));for(let i=0;i{var o;class d{}return(o=d).\u0275fac=function(e){return new(e||o)},o.\u0275mod=n.$C({type:o}),o.\u0275inj=n.G2t({imports:[m.iI.forChild(T),m.iI]}),d})();var y=c(5553);let E=(()=>{var o;class d{}return(o=d).\u0275fac=function(e){return new(e||o)},o.\u0275mod=n.$C({type:o}),o.\u0275inj=n.G2t({imports:[r.MD,I.YN,s.bv,R,y.h]}),d})()}}]);
\ No newline at end of file
diff --git a/www/3675.881df6996b8040b2.js b/www/3675.881df6996b8040b2.js
deleted file mode 100644
index 4fcf9ba..0000000
--- a/www/3675.881df6996b8040b2.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3675],{5553:(f,I,c)=>{c.d(I,{h:()=>u});var a=c(177),_=c(7863),s=c(4438);let u=(()=>{var r;class n{}return(r=n).\u0275fac=function(m){return new(m||r)},r.\u0275mod=s.$C({type:r}),r.\u0275inj=s.G2t({imports:[a.MD,_.bv]}),n})()},3241:(f,I,c)=>{c.d(I,{p:()=>u});var a=c(4438),_=c(177),s=c(7863);let u=(()=>{var r;class n{constructor(m){this.location=m,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(r=n).\u0275fac=function(m){return new(m||r)(a.rXU(_.aZ))},r.\u0275cmp=a.VBU({type:r,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(m,h){1&m&&(a.j41(0,"ion-header",0)(1,"ion-toolbar"),a.nrm(2,"ion-menu-button",1),a.j41(3,"ion-icon",2),a.bIt("click",function(){return h.goBack()}),a.k0s(),a.j41(4,"ion-title"),a.EFF(5),a.k0s()()()),2&m&&(a.Y8G("translucent",!0),a.R7$(5),a.JRh(h.title))},dependencies:[s.eU,s.iq,s.MC,s.BC,s.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),n})()},8453:(f,I,c)=>{c.d(I,{W:()=>s});var a=c(4438),_=c(7863);let s=(()=>{var u;class r{constructor(){this.title="Title"}ngOnInit(){}}return(u=r).\u0275fac=function(p){return new(p||u)},u.\u0275cmp=a.VBU({type:u,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(p,m){1&p&&(a.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),a.EFF(3),a.k0s()()()),2&p&&(a.R7$(3),a.JRh(m.title))},dependencies:[_.hU,_.ln]}),r})()},3675:(f,I,c)=>{c.r(I),c.d(I,{IncidentManagerPageModule:()=>E});var a=c(177),_=c(4341),s=c(7863),u=c(7650),r=c(467),n=c(4438),p=c(4624),m=c(8453),h=c(3241);function M(o,g){1&o&&(n.j41(0,"ion-chip"),n.EFF(1," Assigned to you"),n.k0s())}function v(o,g){if(1&o){const l=n.RV6();n.j41(0,"ion-item",7),n.bIt("click",function(){const t=n.eBV(l).$implicit,i=n.XpG();return n.Njj(i.goToIncident(t))}),n.j41(1,"ion-label",8)(2,"div",9)(3,"h2"),n.EFF(4),n.k0s(),n.DNE(5,M,2,0,"ion-chip"),n.k0s()()()}if(2&o){const l=g.$implicit;n.R7$(4),n.JRh(l.title),n.R7$(),n.vxM(5,l.iAmIn?5:-1)}}function O(o,g){1&o&&(n.j41(0,"ion-chip"),n.EFF(1," Assigned to you"),n.k0s())}function C(o,g){if(1&o){const l=n.RV6();n.j41(0,"ion-item",7),n.bIt("click",function(){const t=n.eBV(l).$implicit,i=n.XpG();return n.Njj(i.goToIncident(t))}),n.j41(1,"ion-label",8)(2,"div",9)(3,"h2"),n.EFF(4),n.k0s(),n.DNE(5,O,2,0,"ion-chip"),n.k0s()()()}if(2&o){const l=g.$implicit;n.R7$(4),n.JRh(l.title),n.R7$(),n.vxM(5,l.iAmIn?5:-1)}}const P=[{path:"",component:(()=>{var o;class g{constructor(e,t,i,d){this.router=e,this.activatedRoute=t,this.loadingCtrl=i,this.incidentService=d,this.productStep="",this.productObjective="",this.orgName="",this.openIncidents=[],this.closeIncidents=[]}ngOnInit(){}ionViewWillEnter(){var e=this;return(0,r.A)(function*(){yield e.showLoading(),e.getParams(),yield e.getOpenIncidents(),yield e.closeIncident(),yield e.getMyOpenIncidents(),yield e.getMyClosedIncidents(),yield e.hideLoading()})()}getParams(){this.activatedRoute.params.subscribe(t=>{this.productObjective=t.productObjective,this.productStep=t.step});const e=JSON.parse(localStorage.getItem("user"));this.orgName=e.orgName,console.log(this.orgName),console.log(this.productObjective),console.log(this.productStep)}getOpenIncidents(){var e=this;return(0,r.A)(function*(){e.openIncidents=yield e.incidentService.getIncidents(e.orgName,e.productObjective,e.productStep),e.openIncidents=e.openIncidents.filter(t=>"open"===t.state)})()}closeIncident(){var e=this;return(0,r.A)(function*(){e.closeIncidents=yield e.incidentService.getIncidents(e.orgName,e.productObjective,e.productStep),e.closeIncidents=e.closeIncidents.filter(t=>"closed"===t.state)})()}getMyOpenIncidents(){var e=this;return(0,r.A)(function*(){const t=JSON.parse(localStorage.getItem("user"));for(let i=0;i{var o;class g{}return(o=g).\u0275fac=function(e){return new(e||o)},o.\u0275mod=n.$C({type:o}),o.\u0275inj=n.G2t({imports:[u.iI.forChild(P),u.iI]}),g})();var y=c(5553);let E=(()=>{var o;class g{}return(o=g).\u0275fac=function(e){return new(e||o)},o.\u0275mod=n.$C({type:o}),o.\u0275inj=n.G2t({imports:[a.MD,_.YN,s.bv,R,y.h]}),g})()}}]);
\ No newline at end of file
diff --git a/www/6749.35cfdb01525f2301.js b/www/6749.35cfdb01525f2301.js
new file mode 100644
index 0000000..191ea60
--- /dev/null
+++ b/www/6749.35cfdb01525f2301.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6749],{5553:(I,h,i)=>{i.d(h,{h:()=>d});var r=i(177),p=i(7863),a=i(4438);let d=(()=>{var l;class e{}return(l=e).\u0275fac=function(u){return new(u||l)},l.\u0275mod=a.$C({type:l}),l.\u0275inj=a.G2t({imports:[r.MD,p.bv]}),e})()},3241:(I,h,i)=>{i.d(h,{p:()=>d});var r=i(4438),p=i(177),a=i(7863);let d=(()=>{var l;class e{constructor(u){this.location=u,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(l=e).\u0275fac=function(u){return new(u||l)(r.rXU(p.aZ))},l.\u0275cmp=r.VBU({type:l,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(u,f){1&u&&(r.j41(0,"ion-header",0)(1,"ion-toolbar"),r.nrm(2,"ion-menu-button",1),r.j41(3,"ion-icon",2),r.bIt("click",function(){return f.goBack()}),r.k0s(),r.j41(4,"ion-title"),r.EFF(5),r.k0s()()()),2&u&&(r.Y8G("translucent",!0),r.R7$(5),r.JRh(f.title))},dependencies:[a.eU,a.iq,a.MC,a.BC,a.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),e})()},8453:(I,h,i)=>{i.d(h,{W:()=>a});var r=i(4438),p=i(7863);let a=(()=>{var d;class l{constructor(){this.title="Title"}ngOnInit(){}}return(d=l).\u0275fac=function(m){return new(m||d)},d.\u0275cmp=r.VBU({type:d,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(m,u){1&m&&(r.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),r.EFF(3),r.k0s()()()),2&m&&(r.R7$(3),r.JRh(u.title))},dependencies:[p.hU,p.ln]}),l})()},6749:(I,h,i)=>{i.r(h),i.d(h,{IncidentPostmortemPageModule:()=>L});var r=i(177),p=i(4341),a=i(7863),d=i(7650),l=i(467),e=i(4438),m=i(9032),u=i(4624),f=i(8453),_=i(3241);const C=[{path:"",component:(()=>{var c;class v{constructor(n,t,o,s){this.router=n,this.activatedRoute=t,this.loadingCtrl=o,this.incidentService=s,this.orgName="",this.productObjective="",this.productStep="",this.incident={},this.wentWrong="",this.canBeLearned="",this.howToPrevent="",this.vertexAI=(0,e.WQX)(m.L9)}ngOnInit(){}ionViewWillEnter(){var n=this;return(0,l.A)(function*(){n.getParams(),yield n.getIncident()})()}getParams(){this.activatedRoute.params.subscribe(t=>{this.productObjective=t.productObjective,this.productStep=t.step,this.incident.title=t.incidentTitle});const n=JSON.parse(localStorage.getItem("user"));this.orgName=n.orgName,console.log(this.orgName),console.log(this.productObjective),console.log(this.productStep),console.log(this.incident.title)}getIncident(){var n=this;return(0,l.A)(function*(){yield n.showLoading(),n.incident=yield n.incidentService.getIncident(n.orgName,n.productObjective,n.productStep,n.incident.title);try{var t,o,s;n.wentWrong=null===(t=n.incident.postmortem)||void 0===t?void 0:t.wentWrong,n.canBeLearned=null===(o=n.incident.postmortem)||void 0===o?void 0:o.canBeLearned,n.howToPrevent=null===(s=n.incident.postmortem)||void 0===s?void 0:s.howToPrevent}catch(w){console.log(w)}yield n.hideLoading()})()}savePostmortem(){var n=this;return(0,l.A)(function*(){yield n.showLoading(),n.incident.postmortem={wentWrong:n.wentWrong,canBeLearned:n.canBeLearned,howToPrevent:n.howToPrevent},n.incident.state="postmortem",console.dir(n.incident),yield n.incidentService.updateIncident(n.orgName,n.productObjective,n.productStep,n.incident).then(function(){var t=(0,l.A)(function*(o){o&&(yield n.hideLoading(),yield n.router.navigate(["/incident-manager",{productObjective:n.productObjective,step:n.productStep}])),yield n.hideLoading()});return function(o){return t.apply(this,arguments)}}())})()}sendToAI(n){var t=this;return(0,l.A)(function*(){yield t.showLoading();try{console.log(n);let s,o="";if("wentWrong"===n){o="Ayudame a completar el Postmortem del siguiente incidente: "+t.incident.title+". Lo sucedido se basa en la sigueinte descripci\xf3n: "+t.incident.description+". Esto fue ";for(let g=0;g{var c;class v{}return(c=v).\u0275fac=function(n){return new(n||c)},c.\u0275mod=e.$C({type:c}),c.\u0275inj=e.G2t({imports:[d.iI.forChild(C),d.iI]}),v})();var M=i(5553);let L=(()=>{var c;class v{}return(c=v).\u0275fac=function(n){return new(n||c)},c.\u0275mod=e.$C({type:c}),c.\u0275inj=e.G2t({imports:[r.MD,p.YN,a.bv,T,M.h]}),v})()}}]);
\ No newline at end of file
diff --git a/www/7907.060d40f84c30ad9b.js b/www/7907.060d40f84c30ad9b.js
new file mode 100644
index 0000000..e486c97
--- /dev/null
+++ b/www/7907.060d40f84c30ad9b.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[7907],{5553:(F,E,r)=>{r.d(E,{h:()=>h});var c=r(177),m=r(7863),a=r(4438);let h=(()=>{var p;class e{}return(p=e).\u0275fac=function(I){return new(I||p)},p.\u0275mod=a.$C({type:p}),p.\u0275inj=a.G2t({imports:[c.MD,m.bv]}),e})()},3241:(F,E,r)=>{r.d(E,{p:()=>h});var c=r(4438),m=r(177),a=r(7863);let h=(()=>{var p;class e{constructor(I){this.location=I,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(p=e).\u0275fac=function(I){return new(I||p)(c.rXU(m.aZ))},p.\u0275cmp=c.VBU({type:p,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(I,s){1&I&&(c.j41(0,"ion-header",0)(1,"ion-toolbar"),c.nrm(2,"ion-menu-button",1),c.j41(3,"ion-icon",2),c.bIt("click",function(){return s.goBack()}),c.k0s(),c.j41(4,"ion-title"),c.EFF(5),c.k0s()()()),2&I&&(c.Y8G("translucent",!0),c.R7$(5),c.JRh(s.title))},dependencies:[a.eU,a.iq,a.MC,a.BC,a.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),e})()},8453:(F,E,r)=>{r.d(E,{W:()=>a});var c=r(4438),m=r(7863);let a=(()=>{var h;class p{constructor(){this.title="Title"}ngOnInit(){}}return(h=p).\u0275fac=function(g){return new(g||h)},h.\u0275cmp=c.VBU({type:h,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(g,I){1&g&&(c.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),c.EFF(3),c.k0s()()()),2&g&&(c.R7$(3),c.JRh(I.title))},dependencies:[m.hU,m.ln]}),p})()},7907:(F,E,r)=>{r.r(E),r.d(E,{IncidentDetailsPageModule:()=>V});var c=r(177),m=r(4341),a=r(7863),h=r(7650),p=r(467),e=r(4438),g=r(2107),I=r(4624),s=r(7473),d=r(8453),l=r(3241);function u(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",26),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.state.toUpperCase())}}function v(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",27),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.state.toLocaleUpperCase())}}function R(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",27),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function C(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",28),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function D(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",29),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function y(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",26),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function b(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",27),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function T(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",28),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function M(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",29),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function O(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",26),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function k(n,_){if(1&n&&(e.j41(0,"div",12),e.nrm(1,"ion-icon",13),e.j41(2,"ion-label",8),e.EFF(3),e.k0s()()),2&n){const o=_.$implicit;e.R7$(3),e.JRh(o)}}function $(n,_){if(1&n&&(e.j41(0,"div",31)(1,"a",34),e.nrm(2,"img",35),e.k0s()()),2&n){const o=e.XpG().$implicit;e.R7$(),e.FS9("href",o.comment,e.B4B),e.R7$(),e.FS9("src",o.comment,e.B4B)}}function N(n,_){if(1&n&&(e.j41(0,"a",36)(1,"ion-chip"),e.nrm(2,"ion-icon",37),e.j41(3,"ion-label"),e.EFF(4),e.k0s()()()),2&n){const o=e.XpG().$implicit,t=e.XpG();e.FS9("href",o.comment,e.B4B),e.R7$(4),e.JRh(t.fileName(o.comment))}}function B(n,_){if(1&n&&(e.j41(0,"a",36)(1,"ion-chip",38),e.nrm(2,"ion-icon",37),e.j41(3,"ion-label"),e.EFF(4),e.k0s()()(),e.j41(5,"p"),e.EFF(6," This is an unknown file type. "),e.k0s()),2&n){const o=e.XpG().$implicit,t=e.XpG();e.FS9("href",o.comment,e.B4B),e.R7$(4),e.JRh(t.fileName(o.comment))}}function L(n,_){if(1&n&&e.nrm(0,"p",39),2&n){const o=e.XpG().$implicit;e.Y8G("innerHTML",o.comment,e.npT)}}function S(n,_){if(1&n&&(e.qex(0),e.j41(1,"ion-card",30)(2,"ion-card-content"),e.DNE(3,$,3,2,"div",31)(4,N,5,2)(5,B,7,2)(6,L,1,1),e.k0s(),e.j41(7,"ion-card-content",32)(8,"div",33),e.nrm(9,"ion-icon",13),e.j41(10,"ion-label",8),e.EFF(11),e.k0s()()()(),e.bVm()),2&n){const o=_.$implicit,t=e.XpG();e.R7$(),e.AVh("self-end",o.from===t.currentUser)("bg-gray-600",o.from===t.currentUser)("self-start",o.from!==t.currentUser)("bg-gray-800",o.from!==t.currentUser),e.R7$(2),e.vxM(3,t.isImage(o.comment)?3:t.isFile(o.comment)?4:"https:"===o.comment.split("/")[0]||"http:"===o.comment.split("/")[0]?5:6),e.R7$(8),e.JRh(o.from)}}function w(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-icon",40),e.bIt("click",function(){e.eBV(o);const i=e.XpG(),f=e.sdS(83);return e.Njj(i.uploadFile(f))}),e.k0s()}}function A(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-icon",41),e.bIt("click",function(){e.eBV(o);const i=e.XpG(),f=e.sdS(83);return e.Njj(i.deleteUploadfile(f))}),e.k0s()}}function G(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-button",42),e.bIt("click",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.closeIncident())}),e.EFF(1,"Close Incident"),e.k0s()}}function X(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-button",43),e.bIt("click",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.closeIncident())}),e.EFF(1,"Close Incident"),e.k0s()}2&n&&e.Y8G("disabled",!0)}function z(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-col",5)(1,"ion-card",6)(2,"ion-card-title",7),e.EFF(3,"Go to Incident Postmortem"),e.k0s(),e.j41(4,"ion-card-content")(5,"p"),e.EFF(6,"Postmortem Culture: Learning from Failure. The postmortem is a retrospective of the incident, focusing on what went wrong, what can be learned, and how to prevent similar incidents in the future."),e.k0s()(),e.j41(7,"ion-card-content",16)(8,"ion-button",44),e.bIt("click",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.postmortemIncident())}),e.EFF(9,"Incident Postmortem"),e.k0s()()()()}}const K=[{path:"",component:(()=>{var n;class _{constructor(t,i,f,j,P){this.router=t,this.activatedRoute=i,this.loadingCtrl=f,this.incidentService=j,this.notificationService=P,this.productStep="",this.productObjective="",this.orgName="",this.currentUser="",this.incident={},this.newComment="",this.storage=(0,e.WQX)(g.wc),this.isImageLoaded=!1,this.decodeURIComponent=decodeURIComponent}ngOnInit(){}ionViewWillEnter(){this.getParams()}getParams(){this.activatedRoute.params.subscribe(i=>{this.productObjective=i.productObjective,this.productStep=i.step,this.incident=JSON.parse(i.incident)});const t=JSON.parse(localStorage.getItem("user"));this.orgName=t.orgName,this.currentUser=t.name,console.log(this.orgName),console.log(this.productObjective),console.log(this.productStep),console.log(this.incident.title)}addComment(){var t=this;return(0,p.A)(function*(){if(yield t.showLoading(),console.log("add comment"),console.log(t.currentUser),console.log(t.newComment),""===t.newComment)return void(yield t.hideLoading());t.incident.report?t.incident.report.push({comment:t.newComment.replace(/\n/g," "),from:t.currentUser}):t.incident.report=[{comment:t.newComment.replace(/\n/g," "),from:t.currentUser}],yield t.incidentService.updateIncident(t.orgName,t.productObjective,t.productStep,t.incident);let i=[];i.push({role:"Incident Commander",member:t.incident.incidentCommander}),i.push({role:"Communications Lead",member:t.incident.communications_lead}),i.push({role:"Operations Lead",member:t.incident.operations_lead});for(let f=0;f{console.log("Uploaded a blob or file!",U.ref.fullPath),i.downloadFile(U.ref.fullPath).then(function(){var Z=(0,p.A)(function*(x){i.newComment=x,yield i.hideLoading(),yield i.addComment(),i.isImageLoaded=!1});return function(x){return Z.apply(this,arguments)}}())})}}})()}downloadFile(t){var i=this;return(0,p.A)(function*(){let f="";return yield(0,g.qk)((0,g.KR)(i.storage,t)).then(j=>{console.log("File available at",j),f=j}),f})()}isImage(t){return/(\.jpg|\.jpeg|\.png|\.gif|\.bmp|\.webp)(\?|$)/i.test(t)}isFile(t){return/(\.csv|\.pdf|\.doc|\.docx|\.ppt|\.pptx|\.xls|\.xlsx|\.txt|\.mp3|\.wav|\.ogg|\.mp4|\.avi|\.mkv|\.mov|\.zip|\.rar|\.7z|\.tar|\.gz)(\?|$)/i.test(t)}fileName(t){var i;return null===(i=decodeURIComponent(t.split("/").pop().split("?")[0]).split("\xb0").pop())||void 0===i?void 0:i.substring(1)}closeIncident(){var t=this;this.incidentService.closeIncident(this.orgName,this.productObjective,this.productStep,this.incident).then(function(){var i=(0,p.A)(function*(f){f&&(yield t.router.navigate(["/incident-manager",{productObjective:t.productObjective,step:t.productStep}]))});return function(f){return i.apply(this,arguments)}}())}postmortemIncident(){var t=this;return(0,p.A)(function*(){yield t.router.navigate(["/incident-postmortem",{orgName:t.orgName,productObjective:t.productObjective,step:t.productStep,currentUser:t.currentUser,incidentTitle:t.incident.title}])})()}showLoading(){var t=this;return(0,p.A)(function*(){yield(yield t.loadingCtrl.create({})).present()})()}hideLoading(){var t=this;return(0,p.A)(function*(){yield t.loadingCtrl.dismiss()})()}deleteUploadfile(t){t.value="",this.isImageLoaded=!1}}return(n=_).\u0275fac=function(t){return new(t||n)(e.rXU(h.Ix),e.rXU(h.nX),e.rXU(a.Xi),e.rXU(I.I),e.rXU(s.J))},n.\u0275cmp=e.VBU({type:n,selectors:[["app-incident-details"]],decls:100,vars:30,consts:[["upload",""],["title","Incident Details"],[3,"fullscreen"],[3,"title"],[1,"lg:m-10","md:m-10"],["size","12","size-md","12","size-lg","12",1,""],[1,"p-5","flex","flex-col","justify-center","items-center"],[1,"text-2xl"],[1,""],["size","6","size-md","4","size-lg","4",1,""],["size","12","size-md","4","size-lg","4",1,""],["size","6","size-md","6","size-lg","6",1,""],[1,"flex","flex-row","justify-center","items-center"],["name","person-circle",1,"text-2xl"],[1,"p-5","flex","flex-col","justify-center","items-start"],[4,"ngFor","ngForOf"],[1,"flex","flex-row","justify-center","items-center","w-full"],["placeholder","Add a comment","type","text",1,"w-2/3",3,"ngModelChange","hidden","autoGrow","ngModel"],[1,"pl-1","pr-1"],["size","large","name","cloud-upload",3,"click","hidden"],["type","file",2,"display","none",3,"change"],["size","large","class","ion-margin","expand","block","name","save",3,"click",4,"ngIf"],["size","large","class","ion-margin","expand","block","name","trash",3,"click",4,"ngIf"],[1,"w-1/3","m-5",3,"click","hidden"],["color","danger",1,"w-full"],["color","danger",1,"w-full",3,"disabled"],[1,"text-green-800"],[1,"text-red-800"],[1,"text-yellow-800"],[1,"text-yellow-600"],[1,"text-white"],[1,"flex","flex-row","w-full","items-end"],[1,"text-right"],[1,"flex","flex-row","justify-end","items-center"],["target","_blank",1,"",3,"href"],["alt","image",1,"w-1/2",3,"src"],["target","_blank",3,"href"],["name","document"],["color","warning"],[3,"innerHTML"],["size","large","expand","block","name","save",1,"ion-margin",3,"click"],["size","large","expand","block","name","trash",1,"ion-margin",3,"click"],["color","danger",1,"w-full",3,"click"],["color","danger",1,"w-full",3,"click","disabled"],["color","primary",1,"w-full",3,"click"]],template:function(t,i){if(1&t){const f=e.RV6();e.nrm(0,"app-header-return",1),e.j41(1,"ion-content",2)(2,"ion-grid"),e.nrm(3,"app-title",3),e.j41(4,"ion-row",4)(5,"ion-col",5)(6,"ion-card",6)(7,"ion-card-title",7),e.EFF(8),e.k0s(),e.j41(9,"ion-card-content")(10,"p",8),e.EFF(11),e.k0s()()()()(),e.j41(12,"ion-row",4)(13,"ion-col",9)(14,"ion-card",6)(15,"ion-card-title",7),e.EFF(16,"Current Status"),e.k0s(),e.DNE(17,u,3,1,"ion-card-content")(18,v,3,1,"ion-card-content"),e.k0s()(),e.j41(19,"ion-col",9)(20,"ion-card",6)(21,"ion-card-title",7),e.EFF(22,"Urgency"),e.k0s(),e.DNE(23,R,3,1,"ion-card-content")(24,C,3,1,"ion-card-content")(25,D,3,1,"ion-card-content")(26,y,3,1,"ion-card-content"),e.k0s()(),e.j41(27,"ion-col",10)(28,"ion-card",6)(29,"ion-card-title",7),e.EFF(30," Organization Impact"),e.k0s(),e.DNE(31,b,3,1,"ion-card-content")(32,T,3,1,"ion-card-content")(33,M,3,1,"ion-card-content")(34,O,3,1,"ion-card-content"),e.k0s()()(),e.nrm(35,"app-title",3),e.j41(36,"ion-row",4)(37,"ion-col",11)(38,"ion-card",6)(39,"ion-card-title",7),e.EFF(40,"Incident Commander"),e.k0s(),e.j41(41,"ion-card-content")(42,"div",12),e.nrm(43,"ion-icon",13),e.j41(44,"ion-label",8),e.EFF(45),e.k0s()()()()(),e.j41(46,"ion-col",11)(47,"ion-card",6)(48,"ion-card-title",7),e.EFF(49,"Communications Leader"),e.k0s(),e.j41(50,"ion-card-content")(51,"div",12),e.nrm(52,"ion-icon",13),e.j41(53,"ion-label",8),e.EFF(54),e.k0s()()()()(),e.j41(55,"ion-col",5)(56,"ion-card",6)(57,"ion-card-title",7),e.EFF(58,"Operations Lead"),e.k0s(),e.j41(59,"ion-card-content")(60,"div",12),e.nrm(61,"ion-icon",13),e.j41(62,"ion-label",8),e.EFF(63),e.k0s()()(),e.nrm(64,"br"),e.j41(65,"ion-card-title",7),e.EFF(66,"Operations Team"),e.k0s(),e.j41(67,"ion-card-content"),e.Z7z(68,k,4,1,"div",12,e.fX1),e.k0s()()()(),e.nrm(70,"app-title",3),e.j41(71,"ion-row",4)(72,"ion-col",5)(73,"ion-card",14),e.DNE(74,S,12,10,"ng-container",15),e.k0s()(),e.j41(75,"ion-col",5)(76,"ion-card",6)(77,"div",16)(78,"ion-textarea",17),e.mxI("ngModelChange",function(P){return e.eBV(f),e.DH7(i.newComment,P)||(i.newComment=P),e.Njj(P)}),e.k0s(),e.j41(79,"div",18)(80,"ion-icon",19),e.bIt("click",function(){e.eBV(f);const P=e.sdS(83);return e.Njj(P.click())}),e.EFF(81," Add Data "),e.j41(82,"input",20,0),e.bIt("change",function(){return e.eBV(f),e.Njj(i.onImageLoad())}),e.k0s()(),e.DNE(84,w,1,0,"ion-icon",21)(85,A,1,0,"ion-icon",22),e.k0s(),e.j41(86,"ion-button",23),e.bIt("click",function(){return e.eBV(f),e.Njj(i.addComment())}),e.EFF(87,"Add Comment"),e.k0s()()()()(),e.j41(88,"ion-row",4)(89,"ion-col",5)(90,"ion-card",6)(91,"ion-card-title",7),e.EFF(92,"Change Incident State"),e.k0s(),e.j41(93,"ion-card-content")(94,"p"),e.EFF(95,"Change the state of the incident to closed or open.Only the incident commander can change the state of the incident."),e.k0s()(),e.j41(96,"ion-card-content",16),e.DNE(97,G,2,0,"ion-button",24)(98,X,2,1,"ion-button",25),e.k0s()()(),e.DNE(99,z,10,0,"ion-col",5),e.k0s()()()}2&t&&(e.R7$(),e.Y8G("fullscreen",!0),e.R7$(2),e.Y8G("title","Incident Details"),e.R7$(5),e.JRh(i.incident.title),e.R7$(3),e.JRh(i.incident.description),e.R7$(6),e.vxM(17,"open"===i.incident.state?17:-1),e.R7$(),e.vxM(18,"closed"===i.incident.state?18:-1),e.R7$(5),e.vxM(23,"Critical"===i.incident.urgency?23:-1),e.R7$(),e.vxM(24,"High"===i.incident.urgency?24:-1),e.R7$(),e.vxM(25,"Medium"===i.incident.urgency?25:-1),e.R7$(),e.vxM(26,"Low"===i.incident.urgency?26:-1),e.R7$(5),e.vxM(31,"Extensive/Widespread"===i.incident.org_impact?31:-1),e.R7$(),e.vxM(32,"Significant/Large"===i.incident.org_impact?32:-1),e.R7$(),e.vxM(33,"Moderate/Limited"===i.incident.org_impact?33:-1),e.R7$(),e.vxM(34,"Minor/Localized"===i.incident.org_impact?34:-1),e.R7$(),e.Y8G("title","Incident Team"),e.R7$(10),e.JRh(i.incident.incidentCommander),e.R7$(9),e.JRh(i.incident.communications_lead),e.R7$(9),e.JRh(i.incident.operations_lead),e.R7$(5),e.Dyx(i.incident.operation_team),e.R7$(2),e.Y8G("title","Incident Progress"),e.R7$(4),e.Y8G("ngForOf",i.incident.report),e.R7$(4),e.Y8G("hidden",i.isImageLoaded)("autoGrow",!0),e.R50("ngModel",i.newComment),e.R7$(2),e.Y8G("hidden",i.isImageLoaded),e.R7$(4),e.Y8G("ngIf",i.isImageLoaded),e.R7$(),e.Y8G("ngIf",i.isImageLoaded),e.R7$(),e.Y8G("hidden",i.isImageLoaded),e.R7$(11),e.vxM(97,i.currentUser===i.incident.incidentCommander&&"open"===i.incident.state?97:-1),e.R7$(),e.vxM(98,i.currentUser!==i.incident.incidentCommander||"closed"===i.incident.state?98:-1),e.R7$(),e.vxM(99,"closed"===i.incident.state?99:-1))},dependencies:[c.Sq,c.bT,m.BC,m.vS,a.Jm,a.b_,a.I9,a.tN,a.ZB,a.hU,a.W9,a.lO,a.iq,a.he,a.ln,a.nc,a.Gw,d.W,l.p]}),_})()}];let W=(()=>{var n;class _{}return(n=_).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[h.iI.forChild(K),h.iI]}),_})();var J=r(5553);let V=(()=>{var n;class _{}return(n=_).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[c.MD,m.YN,a.bv,W,J.h]}),_})()},4796:(F,E,r)=>{r.d(E,{u:()=>p});var c=r(467),m=r(8737),a=r(4262),h=r(4438);let p=(()=>{var e;class g{constructor(s,d){this.auth=s,this.firestore=d}registerUser(s){var d=this;return(0,c.A)(function*(){try{const l=yield(0,m.eJ)(d.auth,s.email,s.password);return l.user?(yield(0,a.BN)((0,a.H9)(d.firestore,"users",l.user.uid),{email:s.email,name:s.name,orgName:s.orgName,uid:l.user.uid}),yield(0,a.BN)((0,a.H9)(d.firestore,"teams",`${s.orgName}`),{name:s.orgName,members:[l.user.uid]}),l):null}catch{return null}})()}loginUser(s){var d=this;return(0,c.A)(function*(){try{var l;const u=yield(0,m.x9)(d.auth,s.email,s.password);if(null!==(l=u.user)&&void 0!==l&&l.uid){const v=yield(0,a.x7)((0,a.H9)(d.firestore,"users",u.user.uid));if(v.exists())return localStorage.setItem("user",JSON.stringify(v.data())),u}}catch(u){console.error(u)}return null})()}logoutUser(){var s=this;return(0,c.A)(function*(){yield s.auth.signOut()})()}addMember(s){var d=this;return(0,c.A)(function*(){try{const l=yield(0,m.eJ)(d.auth,s.email,s.password);if(!l.user)return!1;const u={email:s.email,name:s.name,orgName:s.orgName,uid:l.user.uid};return yield(0,a.BN)((0,a.H9)(d.firestore,"users",l.user.uid),u),u}catch{return!1}})()}}return(e=g).\u0275fac=function(s){return new(s||e)(h.KVO(m.Nj),h.KVO(a._7))},e.\u0275prov=h.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()},7473:(F,E,r)=>{r.d(E,{J:()=>e});var c=r(467),m=r(4262),a=r(4438),h=r(1626),p=r(5092);let e=(()=>{var g;class I{constructor(d,l,u){this.firestore=d,this.http=l,this.teamService=u}saveNotificationID(d,l){var u=this;return(0,c.A)(function*(){const v=(0,m.H9)(u.firestore,"users",d.uid),R=yield(0,m.x7)(v);if(R.exists()){const C=R.data();return C.notificationID=l,yield(0,m.BN)(v,C),!0}return console.log("No such document!"),!1})()}getNotificationUser(d){var l=this;return(0,c.A)(function*(){const u=(0,m.H9)(l.firestore,"users",d.uid),v=yield(0,m.x7)(u);if(v.exists()){const R=v.data();return R.notificationID?R.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(d,l){var u=this;return(0,c.A)(function*(){try{const v=yield u.teamService.getTeamByOrganization(l),R=d.map(y=>y.member),C=v.filter(y=>R.includes(y.name));console.log("team",C);const D="https://devprobeapi.onrender.com/sendNotification";for(let y of C){let b=yield u.getNotificationUser(y);if(console.log("sid",b),""!==b){const M={sid:b,title:"New Incident",type:"new_incident",message:`Hey ${y.name}, you have been assigned a new incident your incident role is ${d.find(O=>O.member===y.name).role}`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield u.http.post(D,M).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(v){console.log(v)}})()}notifyIncidentUpdateToTeam(d,l){var u=this;return(0,c.A)(function*(){try{const v=yield u.teamService.getTeamByOrganization(l),R=d.map(y=>y.member),C=v.filter(y=>R.includes(y.name));console.log("team",C);const D="https://devprobeapi.onrender.com/sendNotification";for(let y of C){let b=yield u.getNotificationUser(y);if(console.log("sid",b),""!==b){const M={sid:b,title:"Incident Update",type:"update_incident",message:`Hey ${y.name}, there are updates to your incident`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield u.http.post(D,M).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(v){console.log(v)}})()}}return(g=I).\u0275fac=function(d){return new(d||g)(a.KVO(m._7),a.KVO(h.Qq),a.KVO(p.O))},g.\u0275prov=a.jDH({token:g,factory:g.\u0275fac,providedIn:"root"}),I})()},5092:(F,E,r)=>{r.d(E,{O:()=>p});var c=r(467),m=r(4262),a=r(4438),h=r(4796);let p=(()=>{var e;class g{constructor(s,d){this.firestore=s,this.authService=d}getTeamByOrganization(s){var d=this;return(0,c.A)(function*(){let l=(0,m.H9)(d.firestore,"teams",s);const R=(yield(0,m.x7)(l)).data();let C=[];for(let D=0;Db!==d);return yield(0,m.BN)(u,{name:C.name,members:D}),u=(0,m.H9)(l.firestore,"users",d),yield(0,m.BN)(u,{}),yield l.authService,!0}catch{return!1}})()}addMember(s){var d=this;return(0,c.A)(function*(){try{const l=yield d.authService.addMember(s);if(!l)return!1;const u=(0,m.H9)(d.firestore,"teams",s.orgName),R=(yield(0,m.x7)(u)).data();console.log(R);const C=R;let D=C.members;return D.push(l.uid),console.log(D),yield(0,m.mZ)(u,{name:C.name,members:D}),l.uid}catch{return!1}})()}}return(e=g).\u0275fac=function(s){return new(s||e)(a.KVO(m._7),a.KVO(h.u))},e.\u0275prov=a.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()}}]);
\ No newline at end of file
diff --git a/www/7907.d72619a0c1833a1b.js b/www/7907.d72619a0c1833a1b.js
deleted file mode 100644
index 22b26cd..0000000
--- a/www/7907.d72619a0c1833a1b.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[7907],{5553:(F,E,r)=>{r.d(E,{h:()=>f});var c=r(177),m=r(7863),a=r(4438);let f=(()=>{var p;class e{}return(p=e).\u0275fac=function(I){return new(I||p)},p.\u0275mod=a.$C({type:p}),p.\u0275inj=a.G2t({imports:[c.MD,m.bv]}),e})()},3241:(F,E,r)=>{r.d(E,{p:()=>f});var c=r(4438),m=r(177),a=r(7863);let f=(()=>{var p;class e{constructor(I){this.location=I,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(p=e).\u0275fac=function(I){return new(I||p)(c.rXU(m.aZ))},p.\u0275cmp=c.VBU({type:p,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(I,s){1&I&&(c.j41(0,"ion-header",0)(1,"ion-toolbar"),c.nrm(2,"ion-menu-button",1),c.j41(3,"ion-icon",2),c.bIt("click",function(){return s.goBack()}),c.k0s(),c.j41(4,"ion-title"),c.EFF(5),c.k0s()()()),2&I&&(c.Y8G("translucent",!0),c.R7$(5),c.JRh(s.title))},dependencies:[a.eU,a.iq,a.MC,a.BC,a.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),e})()},8453:(F,E,r)=>{r.d(E,{W:()=>a});var c=r(4438),m=r(7863);let a=(()=>{var f;class p{constructor(){this.title="Title"}ngOnInit(){}}return(f=p).\u0275fac=function(g){return new(g||f)},f.\u0275cmp=c.VBU({type:f,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(g,I){1&g&&(c.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),c.EFF(3),c.k0s()()()),2&g&&(c.R7$(3),c.JRh(I.title))},dependencies:[m.hU,m.ln]}),p})()},7907:(F,E,r)=>{r.r(E),r.d(E,{IncidentDetailsPageModule:()=>V});var c=r(177),m=r(4341),a=r(7863),f=r(7650),p=r(467),e=r(4438),g=r(2107),I=r(4624),s=r(7473),d=r(8453),l=r(3241);function u(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",26),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.state.toUpperCase())}}function h(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",27),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.state.toLocaleUpperCase())}}function R(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",27),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function C(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",28),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function y(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",29),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function D(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",26),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.urgency.toUpperCase())}}function P(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",27),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function T(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",28),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function M(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",29),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function O(n,_){if(1&n&&(e.j41(0,"ion-card-content")(1,"ion-label",26),e.EFF(2),e.k0s()()),2&n){const o=e.XpG();e.R7$(2),e.JRh(o.incident.org_impact.toUpperCase())}}function k(n,_){if(1&n&&(e.j41(0,"div",12),e.nrm(1,"ion-icon",13),e.j41(2,"ion-label",8),e.EFF(3),e.k0s()()),2&n){const o=_.$implicit;e.R7$(3),e.JRh(o)}}function $(n,_){if(1&n&&(e.j41(0,"div",31)(1,"a",34),e.nrm(2,"img",35),e.k0s()()),2&n){const o=e.XpG().$implicit;e.R7$(),e.FS9("href",o.comment,e.B4B),e.R7$(),e.FS9("src",o.comment,e.B4B)}}function N(n,_){if(1&n&&(e.j41(0,"a",36)(1,"ion-chip"),e.nrm(2,"ion-icon",37),e.j41(3,"ion-label"),e.EFF(4),e.k0s()()()),2&n){const o=e.XpG().$implicit,i=e.XpG();e.FS9("href",o.comment,e.B4B),e.R7$(4),e.JRh(i.fileName(o.comment))}}function B(n,_){if(1&n&&(e.j41(0,"a",36)(1,"ion-chip",38),e.nrm(2,"ion-icon",37),e.j41(3,"ion-label"),e.EFF(4),e.k0s()()(),e.j41(5,"p"),e.EFF(6," This is an unknown file type. "),e.k0s()),2&n){const o=e.XpG().$implicit,i=e.XpG();e.FS9("href",o.comment,e.B4B),e.R7$(4),e.JRh(i.fileName(o.comment))}}function L(n,_){if(1&n&&e.nrm(0,"p",39),2&n){const o=e.XpG().$implicit;e.Y8G("innerHTML",o.comment,e.npT)}}function w(n,_){if(1&n&&(e.qex(0),e.j41(1,"ion-card",30)(2,"ion-card-content"),e.DNE(3,$,3,2,"div",31)(4,N,5,2)(5,B,7,2)(6,L,1,1),e.k0s(),e.j41(7,"ion-card-content",32)(8,"div",33),e.nrm(9,"ion-icon",13),e.j41(10,"ion-label",8),e.EFF(11),e.k0s()()()(),e.bVm()),2&n){const o=_.$implicit,i=e.XpG();e.R7$(),e.AVh("self-end",o.from===i.currentUser)("bg-gray-600",o.from===i.currentUser)("self-start",o.from!==i.currentUser)("bg-gray-800",o.from!==i.currentUser),e.R7$(2),e.vxM(3,i.isImage(o.comment)?3:i.isFile(o.comment)?4:"https:"===o.comment.split("/")[0]||"http:"===o.comment.split("/")[0]?5:6),e.R7$(8),e.JRh(o.from)}}function A(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-icon",40),e.bIt("click",function(){e.eBV(o);const t=e.XpG(),v=e.sdS(83);return e.Njj(t.uploadFile(v))}),e.k0s()}}function G(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-icon",41),e.bIt("click",function(){e.eBV(o);const t=e.XpG(),v=e.sdS(83);return e.Njj(t.deleteUploadfile(v))}),e.k0s()}}function S(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-button",42),e.bIt("click",function(){e.eBV(o);const t=e.XpG();return e.Njj(t.closeIncident())}),e.EFF(1,"Close Incident"),e.k0s()}}function X(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-button",43),e.bIt("click",function(){e.eBV(o);const t=e.XpG();return e.Njj(t.closeIncident())}),e.EFF(1,"Close Incident"),e.k0s()}2&n&&e.Y8G("disabled",!0)}function z(n,_){if(1&n){const o=e.RV6();e.j41(0,"ion-col",5)(1,"ion-card",6)(2,"ion-card-title",7),e.EFF(3,"Go to Incident Postmortem"),e.k0s(),e.j41(4,"ion-card-content")(5,"p"),e.EFF(6,"Postmortem Culture: Learning from Failure. The postmortem is a retrospective of the incident, focusing on what went wrong, what can be learned, and how to prevent similar incidents in the future."),e.k0s()(),e.j41(7,"ion-card-content",16)(8,"ion-button",44),e.bIt("click",function(){e.eBV(o);const t=e.XpG();return e.Njj(t.closeIncident())}),e.EFF(9,"Incident Postmortem"),e.k0s()()()()}}const K=[{path:"",component:(()=>{var n;class _{constructor(i,t,v,b,j){this.router=i,this.activatedRoute=t,this.loadingCtrl=v,this.incidentService=b,this.notificationService=j,this.productStep="",this.productObjective="",this.orgName="",this.currentUser="",this.incident={},this.newComment="",this.storage=(0,e.WQX)(g.wc),this.isImageLoaded=!1,this.decodeURIComponent=decodeURIComponent}ngOnInit(){}ionViewWillEnter(){this.getParams()}getParams(){this.activatedRoute.params.subscribe(t=>{this.productObjective=t.productObjective,this.productStep=t.step,this.incident=JSON.parse(t.incident)});const i=JSON.parse(localStorage.getItem("user"));this.orgName=i.orgName,this.currentUser=i.name,console.log(this.orgName),console.log(this.productObjective),console.log(this.productStep),console.log(this.incident.title)}addComment(){var i=this;return(0,p.A)(function*(){if(yield i.showLoading(),console.log("add comment"),console.log(i.currentUser),console.log(i.newComment),""===i.newComment)return void(yield i.hideLoading());i.incident.report?i.incident.report.push({comment:i.newComment.replace(/\n/g," "),from:i.currentUser}):i.incident.report=[{comment:i.newComment.replace(/\n/g," "),from:i.currentUser}],yield i.incidentService.updateIncident(i.orgName,i.productObjective,i.productStep,i.incident);let t=[];t.push({role:"Incident Commander",member:i.incident.incidentCommander}),t.push({role:"Communications Lead",member:i.incident.communications_lead}),t.push({role:"Operations Lead",member:i.incident.operations_lead});for(let v=0;v{console.log("Uploaded a blob or file!",U.ref.fullPath),t.downloadFile(U.ref.fullPath).then(function(){var Z=(0,p.A)(function*(x){t.newComment=x,yield t.hideLoading(),yield t.addComment(),t.isImageLoaded=!1});return function(x){return Z.apply(this,arguments)}}())})}}})()}downloadFile(i){var t=this;return(0,p.A)(function*(){let v="";return yield(0,g.qk)((0,g.KR)(t.storage,i)).then(b=>{console.log("File available at",b),v=b}),v})()}isImage(i){return/(\.jpg|\.jpeg|\.png|\.gif|\.bmp|\.webp)(\?|$)/i.test(i)}isFile(i){return/(\.csv|\.pdf|\.doc|\.docx|\.ppt|\.pptx|\.xls|\.xlsx|\.txt|\.mp3|\.wav|\.ogg|\.mp4|\.avi|\.mkv|\.mov|\.zip|\.rar|\.7z|\.tar|\.gz)(\?|$)/i.test(i)}fileName(i){var t;return null===(t=decodeURIComponent(i.split("/").pop().split("?")[0]).split("\xb0").pop())||void 0===t?void 0:t.substring(1)}closeIncident(){}saveChanges(){}showLoading(){var i=this;return(0,p.A)(function*(){yield(yield i.loadingCtrl.create({})).present()})()}hideLoading(){var i=this;return(0,p.A)(function*(){yield i.loadingCtrl.dismiss()})()}deleteUploadfile(i){i.value="",this.isImageLoaded=!1}}return(n=_).\u0275fac=function(i){return new(i||n)(e.rXU(f.Ix),e.rXU(f.nX),e.rXU(a.Xi),e.rXU(I.I),e.rXU(s.J))},n.\u0275cmp=e.VBU({type:n,selectors:[["app-incident-details"]],decls:100,vars:30,consts:[["upload",""],["title","Incident Details"],[3,"fullscreen"],[3,"title"],[1,"lg:m-10","md:m-10"],["size","12","size-md","12","size-lg","12",1,""],[1,"p-5","flex","flex-col","justify-center","items-center"],[1,"text-2xl"],[1,""],["size","6","size-md","4","size-lg","4",1,""],["size","12","size-md","4","size-lg","4",1,""],["size","6","size-md","6","size-lg","6",1,""],[1,"flex","flex-row","justify-center","items-center"],["name","person-circle",1,"text-2xl"],[1,"p-5","flex","flex-col","justify-center","items-start"],[4,"ngFor","ngForOf"],[1,"flex","flex-row","justify-center","items-center","w-full"],["placeholder","Add a comment","type","text",1,"w-2/3",3,"ngModelChange","hidden","autoGrow","ngModel"],[1,"pl-1","pr-1"],["size","large","name","cloud-upload",3,"click","hidden"],["type","file",2,"display","none",3,"change"],["size","large","class","ion-margin","expand","block","name","save",3,"click",4,"ngIf"],["size","large","class","ion-margin","expand","block","name","trash",3,"click",4,"ngIf"],[1,"w-1/3","m-5",3,"click","hidden"],["color","danger",1,"w-full"],["color","danger",1,"w-full",3,"disabled"],[1,"text-green-800"],[1,"text-red-800"],[1,"text-yellow-800"],[1,"text-yellow-600"],[1,"text-white"],[1,"flex","flex-row","w-full","items-end"],[1,"text-right"],[1,"flex","flex-row","justify-end","items-center"],["target","_blank",1,"",3,"href"],["alt","image",1,"w-1/2",3,"src"],["target","_blank",3,"href"],["name","document"],["color","warning"],[3,"innerHTML"],["size","large","expand","block","name","save",1,"ion-margin",3,"click"],["size","large","expand","block","name","trash",1,"ion-margin",3,"click"],["color","danger",1,"w-full",3,"click"],["color","danger",1,"w-full",3,"click","disabled"],["color","primary",1,"w-full",3,"click"]],template:function(i,t){if(1&i){const v=e.RV6();e.nrm(0,"app-header-return",1),e.j41(1,"ion-content",2)(2,"ion-grid"),e.nrm(3,"app-title",3),e.j41(4,"ion-row",4)(5,"ion-col",5)(6,"ion-card",6)(7,"ion-card-title",7),e.EFF(8),e.k0s(),e.j41(9,"ion-card-content")(10,"p",8),e.EFF(11),e.k0s()()()()(),e.j41(12,"ion-row",4)(13,"ion-col",9)(14,"ion-card",6)(15,"ion-card-title",7),e.EFF(16,"Current Status"),e.k0s(),e.DNE(17,u,3,1,"ion-card-content")(18,h,3,1,"ion-card-content"),e.k0s()(),e.j41(19,"ion-col",9)(20,"ion-card",6)(21,"ion-card-title",7),e.EFF(22,"Urgency"),e.k0s(),e.DNE(23,R,3,1,"ion-card-content")(24,C,3,1,"ion-card-content")(25,y,3,1,"ion-card-content")(26,D,3,1,"ion-card-content"),e.k0s()(),e.j41(27,"ion-col",10)(28,"ion-card",6)(29,"ion-card-title",7),e.EFF(30," Organization Impact"),e.k0s(),e.DNE(31,P,3,1,"ion-card-content")(32,T,3,1,"ion-card-content")(33,M,3,1,"ion-card-content")(34,O,3,1,"ion-card-content"),e.k0s()()(),e.nrm(35,"app-title",3),e.j41(36,"ion-row",4)(37,"ion-col",11)(38,"ion-card",6)(39,"ion-card-title",7),e.EFF(40,"Incident Commander"),e.k0s(),e.j41(41,"ion-card-content")(42,"div",12),e.nrm(43,"ion-icon",13),e.j41(44,"ion-label",8),e.EFF(45),e.k0s()()()()(),e.j41(46,"ion-col",11)(47,"ion-card",6)(48,"ion-card-title",7),e.EFF(49,"Communications Leader"),e.k0s(),e.j41(50,"ion-card-content")(51,"div",12),e.nrm(52,"ion-icon",13),e.j41(53,"ion-label",8),e.EFF(54),e.k0s()()()()(),e.j41(55,"ion-col",5)(56,"ion-card",6)(57,"ion-card-title",7),e.EFF(58,"Operations Lead"),e.k0s(),e.j41(59,"ion-card-content")(60,"div",12),e.nrm(61,"ion-icon",13),e.j41(62,"ion-label",8),e.EFF(63),e.k0s()()(),e.nrm(64,"br"),e.j41(65,"ion-card-title",7),e.EFF(66,"Operations Team"),e.k0s(),e.j41(67,"ion-card-content"),e.Z7z(68,k,4,1,"div",12,e.fX1),e.k0s()()()(),e.nrm(70,"app-title",3),e.j41(71,"ion-row",4)(72,"ion-col",5)(73,"ion-card",14),e.DNE(74,w,12,10,"ng-container",15),e.k0s()(),e.j41(75,"ion-col",5)(76,"ion-card",6)(77,"div",16)(78,"ion-textarea",17),e.mxI("ngModelChange",function(j){return e.eBV(v),e.DH7(t.newComment,j)||(t.newComment=j),e.Njj(j)}),e.k0s(),e.j41(79,"div",18)(80,"ion-icon",19),e.bIt("click",function(){e.eBV(v);const j=e.sdS(83);return e.Njj(j.click())}),e.EFF(81," Add Data "),e.j41(82,"input",20,0),e.bIt("change",function(){return e.eBV(v),e.Njj(t.onImageLoad())}),e.k0s()(),e.DNE(84,A,1,0,"ion-icon",21)(85,G,1,0,"ion-icon",22),e.k0s(),e.j41(86,"ion-button",23),e.bIt("click",function(){return e.eBV(v),e.Njj(t.addComment())}),e.EFF(87,"Add Comment"),e.k0s()()()()(),e.j41(88,"ion-row",4)(89,"ion-col",5)(90,"ion-card",6)(91,"ion-card-title",7),e.EFF(92,"Change Incident State"),e.k0s(),e.j41(93,"ion-card-content")(94,"p"),e.EFF(95,"Change the state of the incident to closed or open.Only the incident commander can change the state of the incident."),e.k0s()(),e.j41(96,"ion-card-content",16),e.DNE(97,S,2,0,"ion-button",24)(98,X,2,1,"ion-button",25),e.k0s()()(),e.DNE(99,z,10,0,"ion-col",5),e.k0s()()()}2&i&&(e.R7$(),e.Y8G("fullscreen",!0),e.R7$(2),e.Y8G("title","Incident Details"),e.R7$(5),e.JRh(t.incident.title),e.R7$(3),e.JRh(t.incident.description),e.R7$(6),e.vxM(17,"open"===t.incident.state?17:-1),e.R7$(),e.vxM(18,"closed"===t.incident.state?18:-1),e.R7$(5),e.vxM(23,"Critical"===t.incident.urgency?23:-1),e.R7$(),e.vxM(24,"High"===t.incident.urgency?24:-1),e.R7$(),e.vxM(25,"Medium"===t.incident.urgency?25:-1),e.R7$(),e.vxM(26,"Low"===t.incident.urgency?26:-1),e.R7$(5),e.vxM(31,"Extensive/Widespread"===t.incident.org_impact?31:-1),e.R7$(),e.vxM(32,"Significant/Large"===t.incident.org_impact?32:-1),e.R7$(),e.vxM(33,"Moderate/Limited"===t.incident.org_impact?33:-1),e.R7$(),e.vxM(34,"Minor/Localized"===t.incident.org_impact?34:-1),e.R7$(),e.Y8G("title","Incident Team"),e.R7$(10),e.JRh(t.incident.incidentCommander),e.R7$(9),e.JRh(t.incident.communications_lead),e.R7$(9),e.JRh(t.incident.operations_lead),e.R7$(5),e.Dyx(t.incident.operation_team),e.R7$(2),e.Y8G("title","Incident Progress"),e.R7$(4),e.Y8G("ngForOf",t.incident.report),e.R7$(4),e.Y8G("hidden",t.isImageLoaded)("autoGrow",!0),e.R50("ngModel",t.newComment),e.R7$(2),e.Y8G("hidden",t.isImageLoaded),e.R7$(4),e.Y8G("ngIf",t.isImageLoaded),e.R7$(),e.Y8G("ngIf",t.isImageLoaded),e.R7$(),e.Y8G("hidden",t.isImageLoaded),e.R7$(11),e.vxM(97,t.currentUser===t.incident.incidentCommander&&"open"===t.incident.state?97:-1),e.R7$(),e.vxM(98,t.currentUser!==t.incident.incidentCommander||"closed"===t.incident.state?98:-1),e.R7$(),e.vxM(99,"closed"===t.incident.state?99:-1))},dependencies:[c.Sq,c.bT,m.BC,m.vS,a.Jm,a.b_,a.I9,a.tN,a.ZB,a.hU,a.W9,a.lO,a.iq,a.he,a.ln,a.nc,a.Gw,d.W,l.p]}),_})()}];let W=(()=>{var n;class _{}return(n=_).\u0275fac=function(i){return new(i||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[f.iI.forChild(K),f.iI]}),_})();var J=r(5553);let V=(()=>{var n;class _{}return(n=_).\u0275fac=function(i){return new(i||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[c.MD,m.YN,a.bv,W,J.h]}),_})()},4796:(F,E,r)=>{r.d(E,{u:()=>p});var c=r(467),m=r(8737),a=r(4262),f=r(4438);let p=(()=>{var e;class g{constructor(s,d){this.auth=s,this.firestore=d}registerUser(s){var d=this;return(0,c.A)(function*(){try{const l=yield(0,m.eJ)(d.auth,s.email,s.password);return l.user?(yield(0,a.BN)((0,a.H9)(d.firestore,"users",l.user.uid),{email:s.email,name:s.name,orgName:s.orgName,uid:l.user.uid}),yield(0,a.BN)((0,a.H9)(d.firestore,"teams",`${s.orgName}`),{name:s.orgName,members:[l.user.uid]}),l):null}catch{return null}})()}loginUser(s){var d=this;return(0,c.A)(function*(){try{var l;const u=yield(0,m.x9)(d.auth,s.email,s.password);if(null!==(l=u.user)&&void 0!==l&&l.uid){const h=yield(0,a.x7)((0,a.H9)(d.firestore,"users",u.user.uid));if(h.exists())return localStorage.setItem("user",JSON.stringify(h.data())),u}}catch(u){console.error(u)}return null})()}logoutUser(){var s=this;return(0,c.A)(function*(){yield s.auth.signOut()})()}addMember(s){var d=this;return(0,c.A)(function*(){try{const l=yield(0,m.eJ)(d.auth,s.email,s.password);if(!l.user)return!1;const u={email:s.email,name:s.name,orgName:s.orgName,uid:l.user.uid};return yield(0,a.BN)((0,a.H9)(d.firestore,"users",l.user.uid),u),u}catch{return!1}})()}}return(e=g).\u0275fac=function(s){return new(s||e)(f.KVO(m.Nj),f.KVO(a._7))},e.\u0275prov=f.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()},7473:(F,E,r)=>{r.d(E,{J:()=>e});var c=r(467),m=r(4262),a=r(4438),f=r(1626),p=r(5092);let e=(()=>{var g;class I{constructor(d,l,u){this.firestore=d,this.http=l,this.teamService=u}saveNotificationID(d,l){var u=this;return(0,c.A)(function*(){const h=(0,m.H9)(u.firestore,"users",d.uid),R=yield(0,m.x7)(h);if(R.exists()){const C=R.data();return C.notificationID=l,yield(0,m.BN)(h,C),!0}return console.log("No such document!"),!1})()}getNotificationUser(d){var l=this;return(0,c.A)(function*(){const u=(0,m.H9)(l.firestore,"users",d.uid),h=yield(0,m.x7)(u);if(h.exists()){const R=h.data();return R.notificationID?R.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(d,l){var u=this;return(0,c.A)(function*(){try{const h=yield u.teamService.getTeamByOrganization(l),R=d.map(D=>D.member),C=h.filter(D=>R.includes(D.name));console.log("team",C);const y="https://devprobeapi.onrender.com/sendNotification";for(let D of C){let P=yield u.getNotificationUser(D);if(console.log("sid",P),""!==P){const M={sid:P,title:"New Incident",type:"new_incident",message:`Hey ${D.name}, you have been assigned a new incident your incident role is ${d.find(O=>O.member===D.name).role}`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield u.http.post(y,M).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(h){console.log(h)}})()}notifyIncidentUpdateToTeam(d,l){var u=this;return(0,c.A)(function*(){try{const h=yield u.teamService.getTeamByOrganization(l),R=d.map(D=>D.member),C=h.filter(D=>R.includes(D.name));console.log("team",C);const y="https://devprobeapi.onrender.com/sendNotification";for(let D of C){let P=yield u.getNotificationUser(D);if(console.log("sid",P),""!==P){const M={sid:P,title:"Incident Update",type:"update_incident",message:`Hey ${D.name}, there are updates to your incident`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield u.http.post(y,M).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(h){console.log(h)}})()}}return(g=I).\u0275fac=function(d){return new(d||g)(a.KVO(m._7),a.KVO(f.Qq),a.KVO(p.O))},g.\u0275prov=a.jDH({token:g,factory:g.\u0275fac,providedIn:"root"}),I})()},5092:(F,E,r)=>{r.d(E,{O:()=>p});var c=r(467),m=r(4262),a=r(4438),f=r(4796);let p=(()=>{var e;class g{constructor(s,d){this.firestore=s,this.authService=d}getTeamByOrganization(s){var d=this;return(0,c.A)(function*(){let l=(0,m.H9)(d.firestore,"teams",s);const R=(yield(0,m.x7)(l)).data();let C=[];for(let y=0;yP!==d);return yield(0,m.BN)(u,{name:C.name,members:y}),u=(0,m.H9)(l.firestore,"users",d),yield(0,m.BN)(u,{}),yield l.authService,!0}catch{return!1}})()}addMember(s){var d=this;return(0,c.A)(function*(){try{const l=yield d.authService.addMember(s);if(!l)return!1;const u=(0,m.H9)(d.firestore,"teams",s.orgName),R=(yield(0,m.x7)(u)).data();console.log(R);const C=R;let y=C.members;return y.push(l.uid),console.log(y),yield(0,m.mZ)(u,{name:C.name,members:y}),l.uid}catch{return!1}})()}}return(e=g).\u0275fac=function(s){return new(s||e)(a.KVO(m._7),a.KVO(f.u))},e.\u0275prov=a.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()}}]);
\ No newline at end of file
diff --git a/www/common.62b9652b6820acda.js b/www/common.62b9652b6820acda.js
new file mode 100644
index 0000000..e71ab72
--- /dev/null
+++ b/www/common.62b9652b6820acda.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2076],{1263:(w,p,h)=>{h.d(p,{c:()=>g});var v=h(9672),r=h(1086),m=h(8607);const g=(d,f)=>{let _,o;const n=(s,i,a)=>{if(typeof document>"u")return;const c=document.elementFromPoint(s,i);c&&f(c)&&!c.disabled?c!==_&&(t(),e(c,a)):t()},e=(s,i)=>{_=s,o||(o=_);const a=_;(0,v.w)(()=>a.classList.add("ion-activated")),i()},t=(s=!1)=>{if(!_)return;const i=_;(0,v.w)(()=>i.classList.remove("ion-activated")),s&&o!==_&&_.click(),_=void 0};return(0,m.createGesture)({el:d,gestureName:"buttonActiveDrag",threshold:0,onStart:s=>n(s.currentX,s.currentY,r.a),onMove:s=>n(s.currentX,s.currentY,r.b),onEnd:()=>{t(!0),(0,r.h)(),o=void 0}})}},8438:(w,p,h)=>{h.d(p,{g:()=>r});var v=h(8476);const r=()=>{if(void 0!==v.w)return v.w.Capacitor}},5572:(w,p,h)=>{h.d(p,{c:()=>v,i:()=>r});const v=(m,g,d)=>"function"==typeof d?d(m,g):"string"==typeof d?m[d]===g[d]:Array.isArray(g)?g.includes(m):m===g,r=(m,g,d)=>void 0!==m&&(Array.isArray(m)?m.some(f=>v(f,g,d)):v(m,g,d))},3351:(w,p,h)=>{h.d(p,{g:()=>v});const v=(f,_,o,n,e)=>m(f[1],_[1],o[1],n[1],e).map(t=>r(f[0],_[0],o[0],n[0],t)),r=(f,_,o,n,e)=>e*(3*_*Math.pow(e-1,2)+e*(-3*o*e+3*o+n*e))-f*Math.pow(e-1,3),m=(f,_,o,n,e)=>d((n-=e)-3*(o-=e)+3*(_-=e)-(f-=e),3*o-6*_+3*f,3*_-3*f,f).filter(s=>s>=0&&s<=1),d=(f,_,o,n)=>{if(0===f)return((f,_,o)=>{const n=_*_-4*f*o;return n<0?[]:[(-_+Math.sqrt(n))/(2*f),(-_-Math.sqrt(n))/(2*f)]})(_,o,n);const e=(3*(o/=f)-(_/=f)*_)/3,t=(2*_*_*_-9*_*o+27*(n/=f))/27;if(0===e)return[Math.pow(-t,1/3)];if(0===t)return[Math.sqrt(-e),-Math.sqrt(-e)];const s=Math.pow(t/2,2)+Math.pow(e/3,3);if(0===s)return[Math.pow(t/2,.5)-_/3];if(s>0)return[Math.pow(-t/2+Math.sqrt(s),1/3)-Math.pow(t/2+Math.sqrt(s),1/3)-_/3];const i=Math.sqrt(Math.pow(-e/3,3)),a=Math.acos(-t/(2*Math.sqrt(Math.pow(-e/3,3)))),c=2*Math.pow(i,1/3);return[c*Math.cos(a/3)-_/3,c*Math.cos((a+2*Math.PI)/3)-_/3,c*Math.cos((a+4*Math.PI)/3)-_/3]}},5083:(w,p,h)=>{h.d(p,{i:()=>v});const v=r=>r&&""!==r.dir?"rtl"===r.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase())},3126:(w,p,h)=>{h.r(p),h.d(p,{startFocusVisible:()=>g});const v="ion-focused",m=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End"],g=d=>{let f=[],_=!0;const o=d?d.shadowRoot:document,n=d||document.body,e=u=>{f.forEach(l=>l.classList.remove(v)),u.forEach(l=>l.classList.add(v)),f=u},t=()=>{_=!1,e([])},s=u=>{_=m.includes(u.key),_||e([])},i=u=>{if(_&&void 0!==u.composedPath){const l=u.composedPath().filter(y=>!!y.classList&&y.classList.contains("ion-focusable"));e(l)}},a=()=>{o.activeElement===n&&e([])};return o.addEventListener("keydown",s),o.addEventListener("focusin",i),o.addEventListener("focusout",a),o.addEventListener("touchstart",t,{passive:!0}),o.addEventListener("mousedown",t),{destroy:()=>{o.removeEventListener("keydown",s),o.removeEventListener("focusin",i),o.removeEventListener("focusout",a),o.removeEventListener("touchstart",t),o.removeEventListener("mousedown",t)},setFocus:e}}},1086:(w,p,h)=>{h.d(p,{I:()=>r,a:()=>_,b:()=>o,c:()=>f,d:()=>e,h:()=>n});var v=h(8438),r=function(t){return t.Heavy="HEAVY",t.Medium="MEDIUM",t.Light="LIGHT",t}(r||{});const g={getEngine(){const t=(0,v.g)();if(null!=t&&t.isPluginAvailable("Haptics"))return t.Plugins.Haptics},available(){if(!this.getEngine())return!1;const s=(0,v.g)();return"web"!==(null==s?void 0:s.getPlatform())||typeof navigator<"u"&&void 0!==navigator.vibrate},impact(t){const s=this.getEngine();s&&s.impact({style:t.style})},notification(t){const s=this.getEngine();s&&s.notification({type:t.type})},selection(){this.impact({style:r.Light})},selectionStart(){const t=this.getEngine();t&&t.selectionStart()},selectionChanged(){const t=this.getEngine();t&&t.selectionChanged()},selectionEnd(){const t=this.getEngine();t&&t.selectionEnd()}},d=()=>g.available(),f=()=>{d()&&g.selection()},_=()=>{d()&&g.selectionStart()},o=()=>{d()&&g.selectionChanged()},n=()=>{d()&&g.selectionEnd()},e=t=>{d()&&g.impact(t)}},909:(w,p,h)=>{h.d(p,{I:()=>f,a:()=>e,b:()=>d,c:()=>i,d:()=>c,f:()=>t,g:()=>n,i:()=>o,p:()=>a,r:()=>u,s:()=>s});var v=h(467),r=h(4920),m=h(4929);const d="ion-content",f=".ion-content-scroll-host",_=`${d}, ${f}`,o=l=>"ION-CONTENT"===l.tagName,n=function(){var l=(0,v.A)(function*(y){return o(y)?(yield new Promise(D=>(0,r.c)(y,D)),y.getScrollElement()):y});return function(D){return l.apply(this,arguments)}}(),e=l=>l.querySelector(f)||l.querySelector(_),t=l=>l.closest(_),s=(l,y)=>o(l)?l.scrollToTop(y):Promise.resolve(l.scrollTo({top:0,left:0,behavior:y>0?"smooth":"auto"})),i=(l,y,D,M)=>o(l)?l.scrollByPoint(y,D,M):Promise.resolve(l.scrollBy({top:D,left:y,behavior:M>0?"smooth":"auto"})),a=l=>(0,m.b)(l,d),c=l=>{if(o(l)){const D=l.scrollY;return l.scrollY=!1,D}return l.style.setProperty("overflow","hidden"),!0},u=(l,y)=>{o(l)?l.scrollY=y:l.style.removeProperty("overflow")}},3992:(w,p,h)=>{h.d(p,{a:()=>v,b:()=>i,c:()=>_,d:()=>a,e:()=>A,f:()=>f,g:()=>c,h:()=>m,i:()=>r,j:()=>E,k:()=>P,l:()=>o,m:()=>t,n:()=>u,o:()=>e,p:()=>d,q:()=>g,r:()=>O,s:()=>T,t:()=>s,u:()=>D,v:()=>M,w:()=>n,x:()=>l,y:()=>y});const v="data:image/svg+xml;utf8, ",r="data:image/svg+xml;utf8, ",m="data:image/svg+xml;utf8, ",g="data:image/svg+xml;utf8, ",d="data:image/svg+xml;utf8, ",f="data:image/svg+xml;utf8, ",_="data:image/svg+xml;utf8, ",o="data:image/svg+xml;utf8, ",n="data:image/svg+xml;utf8, ",e="data:image/svg+xml;utf8, ",t="data:image/svg+xml;utf8, ",s="data:image/svg+xml;utf8, ",i="data:image/svg+xml;utf8, ",a="data:image/svg+xml;utf8, ",c="data:image/svg+xml;utf8, ",u="data:image/svg+xml;utf8, ",l="data:image/svg+xml;utf8, ",y="data:image/svg+xml;utf8, ",D="data:image/svg+xml;utf8, ",M="data:image/svg+xml;utf8, ",O="data:image/svg+xml;utf8, ",E="data:image/svg+xml;utf8, ",P="data:image/svg+xml;utf8, ",T="data:image/svg+xml;utf8, ",A="data:image/svg+xml;utf8, "},243:(w,p,h)=>{h.d(p,{c:()=>g,g:()=>d});var v=h(8476),r=h(4920),m=h(4929);const g=(_,o,n)=>{let e,t;if(void 0!==v.w&&"MutationObserver"in v.w){const c=Array.isArray(o)?o:[o];e=new MutationObserver(u=>{for(const l of u)for(const y of l.addedNodes)if(y.nodeType===Node.ELEMENT_NODE&&c.includes(y.slot))return n(),void(0,r.r)(()=>s(y))}),e.observe(_,{childList:!0,subtree:!0})}const s=c=>{var u;t&&(t.disconnect(),t=void 0),t=new MutationObserver(l=>{n();for(const y of l)for(const D of y.removedNodes)D.nodeType===Node.ELEMENT_NODE&&D.slot===o&&a()}),t.observe(null!==(u=c.parentElement)&&void 0!==u?u:c,{subtree:!0,childList:!0})},a=()=>{t&&(t.disconnect(),t=void 0)};return{destroy:()=>{e&&(e.disconnect(),e=void 0),a()}}},d=(_,o,n)=>{const e=null==_?0:_.toString().length,t=f(e,o);if(void 0===n)return t;try{return n(e,o)}catch(s){return(0,m.a)("Exception in provided `counterFormatter`.",s),t}},f=(_,o)=>`${_} / ${o}`},1622:(w,p,h)=>{h.r(p),h.d(p,{KEYBOARD_DID_CLOSE:()=>d,KEYBOARD_DID_OPEN:()=>g,copyVisualViewport:()=>O,keyboardDidClose:()=>l,keyboardDidOpen:()=>c,keyboardDidResize:()=>u,resetKeyboardAssist:()=>e,setKeyboardClose:()=>a,setKeyboardOpen:()=>i,startKeyboardAssist:()=>t,trackViewportChanges:()=>M});var v=h(4379);h(8438),h(8476);const g="ionKeyboardDidShow",d="ionKeyboardDidHide";let _={},o={},n=!1;const e=()=>{_={},o={},n=!1},t=E=>{if(v.K.getEngine())s(E);else{if(!E.visualViewport)return;o=O(E.visualViewport),E.visualViewport.onresize=()=>{M(E),c()||u(E)?i(E):l(E)&&a(E)}}},s=E=>{E.addEventListener("keyboardDidShow",P=>i(E,P)),E.addEventListener("keyboardDidHide",()=>a(E))},i=(E,P)=>{y(E,P),n=!0},a=E=>{D(E),n=!1},c=()=>!n&&_.width===o.width&&(_.height-o.height)*o.scale>150,u=E=>n&&!l(E),l=E=>n&&o.height===E.innerHeight,y=(E,P)=>{const A=new CustomEvent(g,{detail:{keyboardHeight:P?P.keyboardHeight:E.innerHeight-o.height}});E.dispatchEvent(A)},D=E=>{const P=new CustomEvent(d);E.dispatchEvent(P)},M=E=>{_=Object.assign({},o),o=O(E.visualViewport)},O=E=>({width:Math.round(E.width),height:Math.round(E.height),offsetTop:E.offsetTop,offsetLeft:E.offsetLeft,pageTop:E.pageTop,pageLeft:E.pageLeft,scale:E.scale})},4379:(w,p,h)=>{h.d(p,{K:()=>g,a:()=>m});var v=h(8438),r=function(d){return d.Unimplemented="UNIMPLEMENTED",d.Unavailable="UNAVAILABLE",d}(r||{}),m=function(d){return d.Body="body",d.Ionic="ionic",d.Native="native",d.None="none",d}(m||{});const g={getEngine(){const d=(0,v.g)();if(null!=d&&d.isPluginAvailable("Keyboard"))return d.Plugins.Keyboard},getResizeMode(){const d=this.getEngine();return null!=d&&d.getResizeMode?d.getResizeMode().catch(f=>{if(f.code!==r.Unimplemented)throw f}):Promise.resolve(void 0)}}},4731:(w,p,h)=>{h.d(p,{c:()=>f});var v=h(467),r=h(8476),m=h(4379);const g=_=>{if(void 0===r.d||_===m.a.None||void 0===_)return null;const o=r.d.querySelector("ion-app");return null!=o?o:r.d.body},d=_=>{const o=g(_);return null===o?0:o.clientHeight},f=function(){var _=(0,v.A)(function*(o){let n,e,t,s;const i=function(){var y=(0,v.A)(function*(){const D=yield m.K.getResizeMode(),M=void 0===D?void 0:D.mode;n=()=>{void 0===s&&(s=d(M)),t=!0,a(t,M)},e=()=>{t=!1,a(t,M)},null==r.w||r.w.addEventListener("keyboardWillShow",n),null==r.w||r.w.addEventListener("keyboardWillHide",e)});return function(){return y.apply(this,arguments)}}(),a=(y,D)=>{o&&o(y,c(D))},c=y=>{if(0===s||s===d(y))return;const D=g(y);return null!==D?new Promise(M=>{const E=new ResizeObserver(()=>{D.clientHeight===s&&(E.disconnect(),M())});E.observe(D)}):void 0};return yield i(),{init:i,destroy:()=>{null==r.w||r.w.removeEventListener("keyboardWillShow",n),null==r.w||r.w.removeEventListener("keyboardWillHide",e),n=e=void 0},isKeyboardVisible:()=>t}});return function(n){return _.apply(this,arguments)}}()},7838:(w,p,h)=>{h.d(p,{c:()=>r});var v=h(467);const r=()=>{let m;return{lock:function(){var d=(0,v.A)(function*(){const f=m;let _;return m=new Promise(o=>_=o),void 0!==f&&(yield f),_});return function(){return d.apply(this,arguments)}}()}}},9001:(w,p,h)=>{h.d(p,{c:()=>m});var v=h(8476),r=h(4920);const m=(g,d,f)=>{let _;const o=()=>!(void 0===d()||void 0!==g.label||null===f()),e=()=>{const s=d();if(void 0===s)return;if(!o())return void s.style.removeProperty("width");const i=f().scrollWidth;if(0===i&&null===s.offsetParent&&void 0!==v.w&&"IntersectionObserver"in v.w){if(void 0!==_)return;const a=_=new IntersectionObserver(c=>{1===c[0].intersectionRatio&&(e(),a.disconnect(),_=void 0)},{threshold:.01,root:g});a.observe(s)}else s.style.setProperty("width",.75*i+"px")};return{calculateNotchWidth:()=>{o()&&(0,r.r)(()=>{e()})},destroy:()=>{_&&(_.disconnect(),_=void 0)}}}},7895:(w,p,h)=>{h.d(p,{S:()=>r});const r={bubbles:{dur:1e3,circles:9,fn:(m,g,d)=>{const f=m*g/d-m+"ms",_=2*Math.PI*g/d;return{r:5,style:{top:32*Math.sin(_)+"%",left:32*Math.cos(_)+"%","animation-delay":f}}}},circles:{dur:1e3,circles:8,fn:(m,g,d)=>{const f=g/d,_=m*f-m+"ms",o=2*Math.PI*f;return{r:5,style:{top:32*Math.sin(o)+"%",left:32*Math.cos(o)+"%","animation-delay":_}}}},circular:{dur:1400,elmDuration:!0,circles:1,fn:()=>({r:20,cx:48,cy:48,fill:"none",viewBox:"24 24 48 48",transform:"translate(0,0)",style:{}})},crescent:{dur:750,circles:1,fn:()=>({r:26,style:{}})},dots:{dur:750,circles:3,fn:(m,g)=>({r:6,style:{left:32-32*g+"%","animation-delay":-110*g+"ms"}})},lines:{dur:1e3,lines:8,fn:(m,g,d)=>({y1:14,y2:26,style:{transform:`rotate(${360/d*g+(g({y1:12,y2:20,style:{transform:`rotate(${360/d*g+(g({y1:17,y2:29,style:{transform:`rotate(${30*g+(g<6?180:-180)}deg)`,"animation-delay":m*g/d-m+"ms"}})},"lines-sharp-small":{dur:1e3,lines:12,fn:(m,g,d)=>({y1:12,y2:20,style:{transform:`rotate(${30*g+(g<6?180:-180)}deg)`,"animation-delay":m*g/d-m+"ms"}})}}},7166:(w,p,h)=>{h.r(p),h.d(p,{createSwipeBackGesture:()=>d});var v=h(4920),r=h(5083),m=h(8607);h(1970);const d=(f,_,o,n,e)=>{const t=f.ownerDocument.defaultView;let s=(0,r.i)(f);const a=D=>s?-D.deltaX:D.deltaX;return(0,m.createGesture)({el:f,gestureName:"goback-swipe",gesturePriority:101,threshold:10,canStart:D=>(s=(0,r.i)(f),(D=>{const{startX:O}=D;return s?O>=t.innerWidth-50:O<=50})(D)&&_()),onStart:o,onMove:D=>{const O=a(D)/t.innerWidth;n(O)},onEnd:D=>{const M=a(D),O=t.innerWidth,E=M/O,P=(D=>s?-D.velocityX:D.velocityX)(D),A=P>=0&&(P>.2||M>O/2),L=(A?1-E:E)*O;let C=0;if(L>5){const R=L/Math.abs(P);C=Math.min(R,540)}e(A,E<=0?.01:(0,v.j)(0,E,.9999),C)}})}},2935:(w,p,h)=>{h.d(p,{w:()=>v});const v=(g,d,f)=>{if(typeof MutationObserver>"u")return;const _=new MutationObserver(o=>{f(r(o,d))});return _.observe(g,{childList:!0,subtree:!0}),_},r=(g,d)=>{let f;return g.forEach(_=>{for(let o=0;o<_.addedNodes.length;o++)f=m(_.addedNodes[o],d)||f}),f},m=(g,d)=>{if(1!==g.nodeType)return;const f=g;return(f.tagName===d.toUpperCase()?[f]:Array.from(f.querySelectorAll(d))).find(o=>o.value===f.value)}},385:(w,p,h)=>{h.d(p,{l:()=>m});var v=h(4438),r=h(7863);let m=(()=>{var g;class d{constructor(){this.title="Header Title"}ngOnInit(){}}return(g=d).\u0275fac=function(_){return new(_||g)},g.\u0275cmp=v.VBU({type:g,selectors:[["app-header"]],inputs:{title:"title"},decls:5,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"]],template:function(_,o){1&_&&(v.j41(0,"ion-header",0)(1,"ion-toolbar"),v.nrm(2,"ion-menu-button",1),v.j41(3,"ion-title"),v.EFF(4),v.k0s()()()),2&_&&(v.Y8G("translucent",!0),v.R7$(4),v.JRh(o.title))},dependencies:[r.eU,r.MC,r.BC,r.ai]}),d})()},6560:(w,p,h)=>{h.d(p,{x:()=>d});var v=h(467),r=h(4262),m=h(4438),g=h(1626);let d=(()=>{var f;class _{constructor(n,e){this.firestore=n,this.http=e,this.url_cpu="https://devprobeapi.onrender.com/flame_graph_date",this.url_mem="https://devprobeapi.onrender.com/flame_graph_memory_date"}getProducts(n){var e=this;return(0,v.A)(function*(){try{const t=(0,r.rJ)(e.firestore,"teams",n,"products");return(yield(0,r.GG)(t)).docs.map(i=>i.data())}catch(t){return console.log(t),[]}})()}getDates(n,e,t){var s=this;return(0,v.A)(function*(){try{t||(t="cpu_usage");const i=(0,r.rJ)(s.firestore,"teams",n,"products",e,t);return(yield(0,r.GG)(i)).docs.map(c=>c.id)}catch(i){return console.log(i),[]}})()}getFlameGraphByDate(n,e,t,s){var i=this;return(0,v.A)(function*(){try{let a={team:n,product:e,date:t};return s?yield i.http.post(i.url_mem,a).toPromise():yield i.http.post(i.url_cpu,a).toPromise()}catch{return{}}})()}}return(f=_).\u0275fac=function(n){return new(n||f)(m.KVO(r._7),m.KVO(g.Qq))},f.\u0275prov=m.jDH({token:f,factory:f.\u0275fac,providedIn:"root"}),_})()},201:(w,p,h)=>{h.d(p,{p:()=>d});var v=h(467),r=h(4262),m=h(4438),g=h(1626);let d=(()=>{var f;class _{constructor(n,e){this.firestore=n,this.httpClient=e,this.url="https://devprobeapi.onrender.com/"}syncRepo(n,e,t,s,i){var a=this;return(0,v.A)(function*(){const c=(0,r.H9)(a.firestore,"teams",n),u=yield(0,r.x7)(c);if(u.exists()){const l=u.data();l.gitHub={key:e,repo:t,branch:s,owner:i},yield(0,r.BN)(c,l)}})()}getSyncRepo(n){var e=this;return(0,v.A)(function*(){const t=(0,r.H9)(e.firestore,"teams",n),s=yield(0,r.x7)(t);return s.exists()?s.data().gitHub:null})()}getFiles(n){var e=this;return(0,v.A)(function*(){const t=yield e.httpClient.post(e.url+"github_repo",{auth:n.key,repo:n.repo,branch:n.branch,owner:n.owner}).toPromise();if(console.log(t),t){let s=t.paths;return s=s.filter(i=>!i.includes(".git")),s=s.filter(i=>!i.includes("node_modules")),s=s.filter(i=>!i.includes(".idea")),s=s.filter(i=>i.includes(".")),s}return[]})()}getContentFromFilePath(n,e){var t=this;return(0,v.A)(function*(){const s=yield t.httpClient.post(t.url+"github_file",{auth:n.key,repo:n.repo,owner:n.owner,path:e}).toPromise();return console.log(s),s?s.content:""})()}}return(f=_).\u0275fac=function(n){return new(n||f)(m.KVO(r._7),m.KVO(g.Qq))},f.\u0275prov=m.jDH({token:f,factory:f.\u0275fac,providedIn:"root"}),_})()},4624:(w,p,h)=>{h.d(p,{I:()=>g});var v=h(467),r=h(4262),m=h(4438);let g=(()=>{var d;class f{constructor(o){this.firestore=o}saveIncident(o,n,e,t){var s=this;return(0,v.A)(function*(){try{console.log(t);const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"incident",e),a=yield(0,r.x7)(i);if(a.exists()){const c=a.data();return c.incidents.push({...t}),yield(0,r.BN)(i,c),!0}return console.log("No such document!"),yield(0,r.BN)(i,{incidents:[t]}),!0}catch(i){return console.log(i),!1}})()}getIncidents(o,n,e){var t=this;return(0,v.A)(function*(){const s=(0,r.H9)(t.firestore,"teams",o,"products",n,"incident",e),i=yield(0,r.x7)(s);if(i.exists()){let a=i.data();return console.log(a),a.incidents}return[]})()}getIncident(o,n,e,t){var s=this;return(0,v.A)(function*(){let i=yield s.getIncidents(o,n,e);for(let a=0;a<=i.length;a++)if(i[a].title===t)return i[a];return{}})()}updateIncident(o,n,e,t){var s=this;return(0,v.A)(function*(){const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"incident",e),a=yield(0,r.x7)(i);if(a.exists()){const c=a.data();let u=c.incidents;console.log(u);for(let l=0;l<=u.length;l++)if(console.log(u[l].title),console.log(t.title),u[l].title===t.title)return console.log("found"),u[l]=t,yield(0,r.BN)(i,c),!0}return!1})()}closeIncident(o,n,e,t){var s=this;return(0,v.A)(function*(){const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"incident",e);t.state="closed";const a=yield(0,r.x7)(i);if(a.exists()){const c=a.data();let u=c.incidents;console.log(u);for(let l=0;l<=u.length;l++)if(console.log(u[l].title),console.log(t.title),u[l].title===t.title)return console.log("found"),u[l]=t,yield(0,r.BN)(i,c),!0}return!1})()}}return(d=f).\u0275fac=function(o){return new(o||d)(m.KVO(r._7))},d.\u0275prov=m.jDH({token:d,factory:d.\u0275fac,providedIn:"root"}),f})()},3661:(w,p,h)=>{h.d(p,{e:()=>d});var v=h(467),r=h(4438),m=h(4262),g=h(1626);let d=(()=>{var f;class _{constructor(n,e){this.firestore=n,this.http=e,this.ipApiURL="https://cors-ea3m.onrender.com/http://ip-api.com/json/"}getLocationDestSrc(n){var e=this;return(0,v.A)(function*(){var t,s,i,a,c,u,l,y;if(!n)return n;const D=e.http.get(e.ipApiURL+n.dst_addr).toPromise(),M=e.http.get(e.ipApiURL+n.src_addr).toPromise(),O=yield D,E=yield M;return n.dst_city=null!==(t=O.city)&&void 0!==t?t:"No city found",n.dst_country=null!==(s=O.country)&&void 0!==s?s:"No country found",n.dst_latitude=null!==(i=O.lat)&&void 0!==i?i:0,n.dst_longitude=null!==(a=O.lon)&&void 0!==a?a:0,n.src_city=null!==(c=E.city)&&void 0!==c?c:"No city found",n.src_country=null!==(u=E.country)&&void 0!==u?u:"No country found",n.src_latitude=null!==(l=E.lat)&&void 0!==l?l:0,n.src_longitude=null!==(y=E.lon)&&void 0!==y?y:0,n})()}getLocationFrom(n){var e=this;return(0,v.A)(function*(){if(!n)return n;let t=n.result;for(let u=0;u{h.d(p,{N:()=>d});var v=h(467),r=h(4262),m=h(4438),g=h(1626);let d=(()=>{var f;class _{constructor(n,e){this.firestore=n,this.http=e,this.ipApiURL="https://cors-ea3m.onrender.com/http://ip-api.com/json/"}getLocation(n){var e=this;return(0,v.A)(function*(){console.log(n);const s=yield e.http.get(e.ipApiURL+n[0].dst_addr).toPromise();for(let c=0;ce.http.get(e.ipApiURL+c.from).toPromise());return(yield Promise.all(i)).forEach((c,u)=>{n[u].fromLatitude=c.lat,n[u].fromLongitude=c.lon,n[u].cityFrom=c.city,n[u].countryFrom=c.country}),console.log(n),n})()}saveLocationResults(n,e,t,s){var i=this;return(0,v.A)(function*(){try{console.log(s,"ripeData");const a=(0,r.rJ)(i.firestore,"teams",n,"products",e,"ripe"),c=(0,r.H9)(a,t),u=s.map(l=>({from:l.from,dst_addr:l.dst_addr,latency:l.latency,cityFrom:l.cityFrom,countryFrom:l.countryFrom,cityTo:l.cityTo,countryTo:l.countryTo,fromLatitude:l.fromLatitude,fromLongitude:l.fromLongitude,toLatitude:l.toLatitude,toLongitude:l.toLongitude,id:l.id}));return yield(0,r.BN)(c,{data:u}),console.log("Data saved",{data:u}),!0}catch(a){return console.log(a),!1}})()}}return(f=_).\u0275fac=function(n){return new(n||f)(m.KVO(r._7),m.KVO(g.Qq))},f.\u0275prov=m.jDH({token:f,factory:f.\u0275fac,providedIn:"root"}),_})()},6241:(w,p,h)=>{h.d(p,{b:()=>g});var v=h(467),r=h(4262),m=h(4438);let g=(()=>{var d;class f{constructor(o){this.firestore=o}addProduct(o,n){var e=this;return(0,v.A)(function*(){try{console.log(o);const t=(0,r.H9)(e.firestore,"teams",n,"products",o.productObjective);return yield(0,r.BN)(t,o),!0}catch(t){return console.log(t),!1}})()}getProducts(o){var n=this;return(0,v.A)(function*(){try{const e=(0,r.rJ)(n.firestore,"teams",o,"products");return(yield(0,r.GG)(e)).docs.map(s=>s.data())}catch(e){return console.log(e),[]}})()}removeProduct(o,n){var e=this;return(0,v.A)(function*(){try{const t=(0,r.H9)(e.firestore,"teams",o,"products",n);return yield(0,r.kd)(t),!0}catch(t){return console.log(t),!1}})()}}return(d=f).\u0275fac=function(o){return new(o||d)(m.KVO(r._7))},d.\u0275prov=m.jDH({token:d,factory:d.\u0275fac,providedIn:"root"}),f})()},2588:(w,p,h)=>{h.d(p,{N:()=>d});var v=h(467),r=h(4262),m=h(4438),g=h(1626);let d=(()=>{var f;class _{constructor(n,e){this.http=n,this.firestore=e,this.measurementsUrl="https://cors-ea3m.onrender.com/https://atlas.ripe.net/api/v2/measurements/",this.measurementID=""}sendTraceRequest(n,e,t,s){var i=this;return(0,v.A)(function*(){console.log("Sending trace request");try{let a={definitions:[{target:n,description:e,type:t,af:4,is_oneoff:!0,protocol:"TCP"}],probes:[]};console.log(s);let c=s.split(",").length-1,u=(s=s.slice(0,-1)).split(","),l=[];for(let M=0;M({id:i.measurementID,dst_addr:l.dst_addr,dst_city:l.dst_city,dst_country:l.dst_country,dst_latitude:l.dst_latitude,dst_longitude:l.dst_longitude,src_addr:l.src_addr,src_city:l.src_city,src_country:l.src_country,src_latitude:l.src_latitude,src_longitude:l.src_longitude,result:l.result}));return yield(0,r.BN)(c,{data:u}),!0}catch(a){return console.log(a),!1}})()}getHistoryResults(n,e){var t=this;return(0,v.A)(function*(){const i=(0,r.rJ)(t.firestore,"teams/"+n+"/products/"+e+"/ripe_trace"),a=yield(0,r.GG)(i);let c=[];return a.docs.forEach(u=>{c.push({id:u.id,data:u.data()})}),console.log(c),c})()}getAllResultsByDescription(n,e,t){var s=this;return(0,v.A)(function*(){try{let i="teams/"+n+"/products/"+e+"/ripe_trace";console.log(i);let a=(0,r.H9)(s.firestore,i,t);return(yield(0,r.x7)(a)).data()}catch(i){return console.log(i),[]}})()}}return(f=_).\u0275fac=function(n){return new(n||f)(m.KVO(g.Qq),m.KVO(r._7))},f.\u0275prov=m.jDH({token:f,factory:f.\u0275fac,providedIn:"root"}),_})()},9640:(w,p,h)=>{h.d(p,{Q:()=>f});var v=h(467),r=h(1985),m=h(4262),g=h(4438),d=h(1626);let f=(()=>{var _;class o{constructor(e,t){this.http=e,this.firestore=t,this.measurementsUrl="https://cors-ea3m.onrender.com/https://atlas.ripe.net/api/v2/measurements/",this.measurementID=""}sendMeasurementRequest(e,t,s,i){var a=this;return(0,v.A)(function*(){let c=i.split(",").length-1;i=i.slice(0,-1);try{let u={definitions:[{target:e,description:"ping",type:"ping",af:4,is_oneoff:!0}],probes:[{requested:c,type:"probes",value:i}]},l={Authorization:"Key 92530695-134f-4cbc-b7c3-ec130f3719b0"};console.log(u);let y=yield a.http.post(a.measurementsUrl,u,{headers:l}).toPromise();return console.log(y),a.measurementID=y.measurements[0],a.measurementID}catch(u){return console.log(u),!1}})()}getMeasurementResults(e){var t=this;return(0,v.A)(function*(){e&&(t.measurementID=e);try{let s={Authorization:"Key 92530695-134f-4cbc-b7c3-ec130f3719b0"};return""===t.measurementID?(console.log("No measurement ID"),!1):t.http.get(t.measurementsUrl+t.measurementID+"/results/",{headers:s})}catch(s){return console.log(s),new r.c}})()}saveMeasurementResults(e,t,s,i){var a=this;return(0,v.A)(function*(){try{const c=(0,m.rJ)(a.firestore,"teams",e,"products",t,"ripe"),u=(0,m.H9)(c,s),l=i.map((y,D)=>({id:a.measurementID,from:y.from,dst_addr:y.dst_addr,latency:y.latency}));return yield(0,m.BN)(u,{data:l}),!0}catch(c){return console.log(c),!1}})()}getAllResultsByDescription(e,t,s){var i=this;return(0,v.A)(function*(){try{let a="teams/"+e+"/products/"+t+"/ripe";console.log(a);let c=(0,m.H9)(i.firestore,a,s);return(yield(0,m.x7)(c)).data()}catch(a){return console.log(a),[]}})()}getHistoryResults(e,t){var s=this;return(0,v.A)(function*(){const a=(0,m.rJ)(s.firestore,"teams/"+e+"/products/"+t+"/ripe"),c=yield(0,m.GG)(a);let u=[];return c.docs.forEach(l=>{u.push({id:l.id,data:l.data()})}),console.log(u),u})()}deleteHistory(e,t,s){var i=this;return(0,v.A)(function*(){const c=(0,m.H9)(i.firestore,"teams/"+e+"/products/"+t+"/ripe",s);try{return yield(0,m.kd)(c),!0}catch(u){return console.log(u),!1}})()}}return(_=o).\u0275fac=function(e){return new(e||_)(g.KVO(d.Qq),g.KVO(m._7))},_.\u0275prov=g.jDH({token:_,factory:_.\u0275fac,providedIn:"root"}),o})()},9536:(w,p,h)=>{h.d(p,{Q:()=>g});var v=h(467),r=h(4262),m=h(4438);let g=(()=>{var d;class f{constructor(o){this.firestore=o}addSystemTest(o,n,e,t){var s=this;return(0,v.A)(function*(){const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"software_testing","integration_tests"),a=yield(0,r.x7)(i);if(a.exists()){const c=a.data();if(!c[e])return c[e]=[t],yield(0,r.BN)(i,c),void console.log("Document created with ID: ",i.id);c[e].push(t),yield(0,r.BN)(i,c),console.log("Document updated with ID: ",a.id)}else console.log("No such document!"),yield(0,r.BN)(i,{[e]:[t]}),console.log("Document created with ID: ",i.id)})()}getIntegrationTests(o,n,e){var t=this;return(0,v.A)(function*(){const s=(0,r.H9)(t.firestore,"teams",o,"products",n,"software_testing","integration_tests"),i=yield(0,r.x7)(s);return i.exists()?i.data()[e]:[]})()}updateIntegrationTestState(o,n,e,t,s){var i=this;return(0,v.A)(function*(){const a=(0,r.H9)(i.firestore,"teams",o,"products",n,"software_testing","integration_tests"),c=yield(0,r.x7)(a);if(c.exists()){const u=c.data();for(let l=0;l{h.d(p,{h:()=>g});var v=h(467),r=h(4262),m=h(4438);let g=(()=>{var d;class f{constructor(o){this.firestore=o}addSystemTest(o,n,e,t){var s=this;return(0,v.A)(function*(){const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"software_testing","system_tests"),a=yield(0,r.x7)(i);if(a.exists()){const c=a.data();if(!c[e])return c[e]=[t],yield(0,r.BN)(i,c),void console.log("Document created with ID: ",i.id);c[e].push(t),yield(0,r.BN)(i,c),console.log("Document updated with ID: ",a.id)}else console.log("No such document!"),yield(0,r.BN)(i,{[e]:[t]}),console.log("Document created with ID: ",i.id)})()}getSystemTest(o,n,e){var t=this;return(0,v.A)(function*(){const s=(0,r.H9)(t.firestore,"teams",o,"products",n,"software_testing","system_tests"),i=yield(0,r.x7)(s);return i.exists()?i.data()[e]:[]})()}saveSystemTest(o,n,e,t){var s=this;return(0,v.A)(function*(){const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),a=new Date,c=`${a.getFullYear()}-${a.getMonth()+1}-${a.getDate()} ${a.getHours()}:${a.getMinutes()}:${a.getSeconds()}`;console.log(c);const u=yield(0,r.x7)(i);if(u.exists()){let l=u.data();l[c]={systemTest:t},l[c].productStep=e,yield(0,r.BN)(i,l)}else yield(0,r.BN)(i,{[c]:{systemTest:t,productStep:e}})})()}getSystemTestHistoryByStep(o,n,e){var t=this;return(0,v.A)(function*(){const s=(0,r.H9)(t.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),i=yield(0,r.x7)(s);if(i.exists()){const a=i.data();return Object.keys(a).filter(u=>a[u].productStep===e).map(u=>a[u].systemTest)}return[]})()}getSystemTestHistoryByTitle(o,n,e,t){var s=this;return(0,v.A)(function*(){const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),a=yield(0,r.x7)(i);let c=[];if(a.exists()){const u=a.data();for(let l in u)u[l].systemTest.title===t&&u[l].productStep===e&&c.push({timestamp:l,systemTest:u[l].systemTest})}return c})()}getSystemTestByTimestamp(o,n,e,t,s){var i=this;return(0,v.A)(function*(){const a=(0,r.H9)(i.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),c=yield(0,r.x7)(a);if(c.exists()){const u=c.data();for(let l in u)if(u[l].systemTest.title===t&&l===s&&u[l].productStep===e)return u[l].systemTest}return{}})()}deleteSystemTestHistoryByKey(o,n,e,t,s){var i=this;return(0,v.A)(function*(){const a=(0,r.H9)(i.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),c=yield(0,r.x7)(a);if(c.exists()){const u=c.data();for(let l in u)u[l].systemTest.title===t&&l===s&&u[l].productStep===e&&delete u[l];yield(0,r.BN)(a,u)}})()}getSystemTestHistory(o,n){var e=this;return(0,v.A)(function*(){const t=(0,r.H9)(e.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),s=yield(0,r.x7)(t);return s.exists()?s.data():{}})()}deleteSystemTest(o,n,e,t){var s=this;return(0,v.A)(function*(){let i=(0,r.H9)(s.firestore,"teams",o,"products",n,"software_testing","system_tests"),a=yield(0,r.x7)(i);if(a.exists()){let c=a.data();c[e]=c[e].filter(u=>u.title!==t.title),yield(0,r.BN)(i,c)}if(i=(0,r.H9)(s.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),a=yield(0,r.x7)(i),a.exists()){let c=a.data();for(let u in c)console.log(c[u].systemTest.title),c[u].systemTest.title===t.title&&delete c[u];yield(0,r.BN)(i,c)}})()}}return(d=f).\u0275fac=function(o){return new(o||d)(m.KVO(r._7))},d.\u0275prov=m.jDH({token:d,factory:d.\u0275fac,providedIn:"root"}),f})()},1854:(w,p,h)=>{h.d(p,{I:()=>g});var v=h(467),r=h(4262),m=h(4438);let g=(()=>{var d;class f{constructor(o){this.firestore=o}addUnitTest(o,n,e,t){var s=this;return(0,v.A)(function*(){const i=(0,r.H9)(s.firestore,"teams",o,"products",n,"software_testing","unit_tests"),a=yield(0,r.x7)(i);if(a.exists()){let c=a.data();if(!c[e])return c[e]=[t],yield(0,r.BN)(i,c),void console.log("Document created with ID: ",i.id);for(let u=0;u{h.d(p,{c:()=>g});var v=h(9672),s=h(1086),m=h(8607);const g=(l,_)=>{let u,o;const n=(r,i,c)=>{if(typeof document>"u")return;const a=document.elementFromPoint(r,i);a&&_(a)&&!a.disabled?a!==u&&(e(),t(a,c)):e()},t=(r,i)=>{u=r,o||(o=u);const c=u;(0,v.w)(()=>c.classList.add("ion-activated")),i()},e=(r=!1)=>{if(!u)return;const i=u;(0,v.w)(()=>i.classList.remove("ion-activated")),r&&o!==u&&u.click(),u=void 0};return(0,m.createGesture)({el:l,gestureName:"buttonActiveDrag",threshold:0,onStart:r=>n(r.currentX,r.currentY,s.a),onMove:r=>n(r.currentX,r.currentY,s.b),onEnd:()=>{e(!0),(0,s.h)(),o=void 0}})}},8438:(w,p,h)=>{h.d(p,{g:()=>s});var v=h(8476);const s=()=>{if(void 0!==v.w)return v.w.Capacitor}},5572:(w,p,h)=>{h.d(p,{c:()=>v,i:()=>s});const v=(m,g,l)=>"function"==typeof l?l(m,g):"string"==typeof l?m[l]===g[l]:Array.isArray(g)?g.includes(m):m===g,s=(m,g,l)=>void 0!==m&&(Array.isArray(m)?m.some(_=>v(_,g,l)):v(m,g,l))},3351:(w,p,h)=>{h.d(p,{g:()=>v});const v=(_,u,o,n,t)=>m(_[1],u[1],o[1],n[1],t).map(e=>s(_[0],u[0],o[0],n[0],e)),s=(_,u,o,n,t)=>t*(3*u*Math.pow(t-1,2)+t*(-3*o*t+3*o+n*t))-_*Math.pow(t-1,3),m=(_,u,o,n,t)=>l((n-=t)-3*(o-=t)+3*(u-=t)-(_-=t),3*o-6*u+3*_,3*u-3*_,_).filter(r=>r>=0&&r<=1),l=(_,u,o,n)=>{if(0===_)return((_,u,o)=>{const n=u*u-4*_*o;return n<0?[]:[(-u+Math.sqrt(n))/(2*_),(-u-Math.sqrt(n))/(2*_)]})(u,o,n);const t=(3*(o/=_)-(u/=_)*u)/3,e=(2*u*u*u-9*u*o+27*(n/=_))/27;if(0===t)return[Math.pow(-e,1/3)];if(0===e)return[Math.sqrt(-t),-Math.sqrt(-t)];const r=Math.pow(e/2,2)+Math.pow(t/3,3);if(0===r)return[Math.pow(e/2,.5)-u/3];if(r>0)return[Math.pow(-e/2+Math.sqrt(r),1/3)-Math.pow(e/2+Math.sqrt(r),1/3)-u/3];const i=Math.sqrt(Math.pow(-t/3,3)),c=Math.acos(-e/(2*Math.sqrt(Math.pow(-t/3,3)))),a=2*Math.pow(i,1/3);return[a*Math.cos(c/3)-u/3,a*Math.cos((c+2*Math.PI)/3)-u/3,a*Math.cos((c+4*Math.PI)/3)-u/3]}},5083:(w,p,h)=>{h.d(p,{i:()=>v});const v=s=>s&&""!==s.dir?"rtl"===s.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase())},3126:(w,p,h)=>{h.r(p),h.d(p,{startFocusVisible:()=>g});const v="ion-focused",m=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End"],g=l=>{let _=[],u=!0;const o=l?l.shadowRoot:document,n=l||document.body,t=f=>{_.forEach(d=>d.classList.remove(v)),f.forEach(d=>d.classList.add(v)),_=f},e=()=>{u=!1,t([])},r=f=>{u=m.includes(f.key),u||t([])},i=f=>{if(u&&void 0!==f.composedPath){const d=f.composedPath().filter(y=>!!y.classList&&y.classList.contains("ion-focusable"));t(d)}},c=()=>{o.activeElement===n&&t([])};return o.addEventListener("keydown",r),o.addEventListener("focusin",i),o.addEventListener("focusout",c),o.addEventListener("touchstart",e,{passive:!0}),o.addEventListener("mousedown",e),{destroy:()=>{o.removeEventListener("keydown",r),o.removeEventListener("focusin",i),o.removeEventListener("focusout",c),o.removeEventListener("touchstart",e),o.removeEventListener("mousedown",e)},setFocus:t}}},1086:(w,p,h)=>{h.d(p,{I:()=>s,a:()=>u,b:()=>o,c:()=>_,d:()=>t,h:()=>n});var v=h(8438),s=function(e){return e.Heavy="HEAVY",e.Medium="MEDIUM",e.Light="LIGHT",e}(s||{});const g={getEngine(){const e=(0,v.g)();if(null!=e&&e.isPluginAvailable("Haptics"))return e.Plugins.Haptics},available(){if(!this.getEngine())return!1;const r=(0,v.g)();return"web"!==(null==r?void 0:r.getPlatform())||typeof navigator<"u"&&void 0!==navigator.vibrate},impact(e){const r=this.getEngine();r&&r.impact({style:e.style})},notification(e){const r=this.getEngine();r&&r.notification({type:e.type})},selection(){this.impact({style:s.Light})},selectionStart(){const e=this.getEngine();e&&e.selectionStart()},selectionChanged(){const e=this.getEngine();e&&e.selectionChanged()},selectionEnd(){const e=this.getEngine();e&&e.selectionEnd()}},l=()=>g.available(),_=()=>{l()&&g.selection()},u=()=>{l()&&g.selectionStart()},o=()=>{l()&&g.selectionChanged()},n=()=>{l()&&g.selectionEnd()},t=e=>{l()&&g.impact(e)}},909:(w,p,h)=>{h.d(p,{I:()=>_,a:()=>t,b:()=>l,c:()=>i,d:()=>a,f:()=>e,g:()=>n,i:()=>o,p:()=>c,r:()=>f,s:()=>r});var v=h(467),s=h(4920),m=h(4929);const l="ion-content",_=".ion-content-scroll-host",u=`${l}, ${_}`,o=d=>"ION-CONTENT"===d.tagName,n=function(){var d=(0,v.A)(function*(y){return o(y)?(yield new Promise(D=>(0,s.c)(y,D)),y.getScrollElement()):y});return function(D){return d.apply(this,arguments)}}(),t=d=>d.querySelector(_)||d.querySelector(u),e=d=>d.closest(u),r=(d,y)=>o(d)?d.scrollToTop(y):Promise.resolve(d.scrollTo({top:0,left:0,behavior:y>0?"smooth":"auto"})),i=(d,y,D,M)=>o(d)?d.scrollByPoint(y,D,M):Promise.resolve(d.scrollBy({top:D,left:y,behavior:M>0?"smooth":"auto"})),c=d=>(0,m.b)(d,l),a=d=>{if(o(d)){const D=d.scrollY;return d.scrollY=!1,D}return d.style.setProperty("overflow","hidden"),!0},f=(d,y)=>{o(d)?d.scrollY=y:d.style.removeProperty("overflow")}},3992:(w,p,h)=>{h.d(p,{a:()=>v,b:()=>i,c:()=>u,d:()=>c,e:()=>A,f:()=>_,g:()=>a,h:()=>m,i:()=>s,j:()=>E,k:()=>P,l:()=>o,m:()=>e,n:()=>f,o:()=>t,p:()=>l,q:()=>g,r:()=>O,s:()=>T,t:()=>r,u:()=>D,v:()=>M,w:()=>n,x:()=>d,y:()=>y});const v="data:image/svg+xml;utf8, ",s="data:image/svg+xml;utf8, ",m="data:image/svg+xml;utf8, ",g="data:image/svg+xml;utf8, ",l="data:image/svg+xml;utf8, ",_="data:image/svg+xml;utf8, ",u="data:image/svg+xml;utf8, ",o="data:image/svg+xml;utf8, ",n="data:image/svg+xml;utf8, ",t="data:image/svg+xml;utf8, ",e="data:image/svg+xml;utf8, ",r="data:image/svg+xml;utf8, ",i="data:image/svg+xml;utf8, ",c="data:image/svg+xml;utf8, ",a="data:image/svg+xml;utf8, ",f="data:image/svg+xml;utf8, ",d="data:image/svg+xml;utf8, ",y="data:image/svg+xml;utf8, ",D="data:image/svg+xml;utf8, ",M="data:image/svg+xml;utf8, ",O="data:image/svg+xml;utf8, ",E="data:image/svg+xml;utf8, ",P="data:image/svg+xml;utf8, ",T="data:image/svg+xml;utf8, ",A="data:image/svg+xml;utf8, "},243:(w,p,h)=>{h.d(p,{c:()=>g,g:()=>l});var v=h(8476),s=h(4920),m=h(4929);const g=(u,o,n)=>{let t,e;if(void 0!==v.w&&"MutationObserver"in v.w){const a=Array.isArray(o)?o:[o];t=new MutationObserver(f=>{for(const d of f)for(const y of d.addedNodes)if(y.nodeType===Node.ELEMENT_NODE&&a.includes(y.slot))return n(),void(0,s.r)(()=>r(y))}),t.observe(u,{childList:!0,subtree:!0})}const r=a=>{var f;e&&(e.disconnect(),e=void 0),e=new MutationObserver(d=>{n();for(const y of d)for(const D of y.removedNodes)D.nodeType===Node.ELEMENT_NODE&&D.slot===o&&c()}),e.observe(null!==(f=a.parentElement)&&void 0!==f?f:a,{subtree:!0,childList:!0})},c=()=>{e&&(e.disconnect(),e=void 0)};return{destroy:()=>{t&&(t.disconnect(),t=void 0),c()}}},l=(u,o,n)=>{const t=null==u?0:u.toString().length,e=_(t,o);if(void 0===n)return e;try{return n(t,o)}catch(r){return(0,m.a)("Exception in provided `counterFormatter`.",r),e}},_=(u,o)=>`${u} / ${o}`},1622:(w,p,h)=>{h.r(p),h.d(p,{KEYBOARD_DID_CLOSE:()=>l,KEYBOARD_DID_OPEN:()=>g,copyVisualViewport:()=>O,keyboardDidClose:()=>d,keyboardDidOpen:()=>a,keyboardDidResize:()=>f,resetKeyboardAssist:()=>t,setKeyboardClose:()=>c,setKeyboardOpen:()=>i,startKeyboardAssist:()=>e,trackViewportChanges:()=>M});var v=h(4379);h(8438),h(8476);const g="ionKeyboardDidShow",l="ionKeyboardDidHide";let u={},o={},n=!1;const t=()=>{u={},o={},n=!1},e=E=>{if(v.K.getEngine())r(E);else{if(!E.visualViewport)return;o=O(E.visualViewport),E.visualViewport.onresize=()=>{M(E),a()||f(E)?i(E):d(E)&&c(E)}}},r=E=>{E.addEventListener("keyboardDidShow",P=>i(E,P)),E.addEventListener("keyboardDidHide",()=>c(E))},i=(E,P)=>{y(E,P),n=!0},c=E=>{D(E),n=!1},a=()=>!n&&u.width===o.width&&(u.height-o.height)*o.scale>150,f=E=>n&&!d(E),d=E=>n&&o.height===E.innerHeight,y=(E,P)=>{const A=new CustomEvent(g,{detail:{keyboardHeight:P?P.keyboardHeight:E.innerHeight-o.height}});E.dispatchEvent(A)},D=E=>{const P=new CustomEvent(l);E.dispatchEvent(P)},M=E=>{u=Object.assign({},o),o=O(E.visualViewport)},O=E=>({width:Math.round(E.width),height:Math.round(E.height),offsetTop:E.offsetTop,offsetLeft:E.offsetLeft,pageTop:E.pageTop,pageLeft:E.pageLeft,scale:E.scale})},4379:(w,p,h)=>{h.d(p,{K:()=>g,a:()=>m});var v=h(8438),s=function(l){return l.Unimplemented="UNIMPLEMENTED",l.Unavailable="UNAVAILABLE",l}(s||{}),m=function(l){return l.Body="body",l.Ionic="ionic",l.Native="native",l.None="none",l}(m||{});const g={getEngine(){const l=(0,v.g)();if(null!=l&&l.isPluginAvailable("Keyboard"))return l.Plugins.Keyboard},getResizeMode(){const l=this.getEngine();return null!=l&&l.getResizeMode?l.getResizeMode().catch(_=>{if(_.code!==s.Unimplemented)throw _}):Promise.resolve(void 0)}}},4731:(w,p,h)=>{h.d(p,{c:()=>_});var v=h(467),s=h(8476),m=h(4379);const g=u=>{if(void 0===s.d||u===m.a.None||void 0===u)return null;const o=s.d.querySelector("ion-app");return null!=o?o:s.d.body},l=u=>{const o=g(u);return null===o?0:o.clientHeight},_=function(){var u=(0,v.A)(function*(o){let n,t,e,r;const i=function(){var y=(0,v.A)(function*(){const D=yield m.K.getResizeMode(),M=void 0===D?void 0:D.mode;n=()=>{void 0===r&&(r=l(M)),e=!0,c(e,M)},t=()=>{e=!1,c(e,M)},null==s.w||s.w.addEventListener("keyboardWillShow",n),null==s.w||s.w.addEventListener("keyboardWillHide",t)});return function(){return y.apply(this,arguments)}}(),c=(y,D)=>{o&&o(y,a(D))},a=y=>{if(0===r||r===l(y))return;const D=g(y);return null!==D?new Promise(M=>{const E=new ResizeObserver(()=>{D.clientHeight===r&&(E.disconnect(),M())});E.observe(D)}):void 0};return yield i(),{init:i,destroy:()=>{null==s.w||s.w.removeEventListener("keyboardWillShow",n),null==s.w||s.w.removeEventListener("keyboardWillHide",t),n=t=void 0},isKeyboardVisible:()=>e}});return function(n){return u.apply(this,arguments)}}()},7838:(w,p,h)=>{h.d(p,{c:()=>s});var v=h(467);const s=()=>{let m;return{lock:function(){var l=(0,v.A)(function*(){const _=m;let u;return m=new Promise(o=>u=o),void 0!==_&&(yield _),u});return function(){return l.apply(this,arguments)}}()}}},9001:(w,p,h)=>{h.d(p,{c:()=>m});var v=h(8476),s=h(4920);const m=(g,l,_)=>{let u;const o=()=>!(void 0===l()||void 0!==g.label||null===_()),t=()=>{const r=l();if(void 0===r)return;if(!o())return void r.style.removeProperty("width");const i=_().scrollWidth;if(0===i&&null===r.offsetParent&&void 0!==v.w&&"IntersectionObserver"in v.w){if(void 0!==u)return;const c=u=new IntersectionObserver(a=>{1===a[0].intersectionRatio&&(t(),c.disconnect(),u=void 0)},{threshold:.01,root:g});c.observe(r)}else r.style.setProperty("width",.75*i+"px")};return{calculateNotchWidth:()=>{o()&&(0,s.r)(()=>{t()})},destroy:()=>{u&&(u.disconnect(),u=void 0)}}}},7895:(w,p,h)=>{h.d(p,{S:()=>s});const s={bubbles:{dur:1e3,circles:9,fn:(m,g,l)=>{const _=m*g/l-m+"ms",u=2*Math.PI*g/l;return{r:5,style:{top:32*Math.sin(u)+"%",left:32*Math.cos(u)+"%","animation-delay":_}}}},circles:{dur:1e3,circles:8,fn:(m,g,l)=>{const _=g/l,u=m*_-m+"ms",o=2*Math.PI*_;return{r:5,style:{top:32*Math.sin(o)+"%",left:32*Math.cos(o)+"%","animation-delay":u}}}},circular:{dur:1400,elmDuration:!0,circles:1,fn:()=>({r:20,cx:48,cy:48,fill:"none",viewBox:"24 24 48 48",transform:"translate(0,0)",style:{}})},crescent:{dur:750,circles:1,fn:()=>({r:26,style:{}})},dots:{dur:750,circles:3,fn:(m,g)=>({r:6,style:{left:32-32*g+"%","animation-delay":-110*g+"ms"}})},lines:{dur:1e3,lines:8,fn:(m,g,l)=>({y1:14,y2:26,style:{transform:`rotate(${360/l*g+(g({y1:12,y2:20,style:{transform:`rotate(${360/l*g+(g({y1:17,y2:29,style:{transform:`rotate(${30*g+(g<6?180:-180)}deg)`,"animation-delay":m*g/l-m+"ms"}})},"lines-sharp-small":{dur:1e3,lines:12,fn:(m,g,l)=>({y1:12,y2:20,style:{transform:`rotate(${30*g+(g<6?180:-180)}deg)`,"animation-delay":m*g/l-m+"ms"}})}}},7166:(w,p,h)=>{h.r(p),h.d(p,{createSwipeBackGesture:()=>l});var v=h(4920),s=h(5083),m=h(8607);h(1970);const l=(_,u,o,n,t)=>{const e=_.ownerDocument.defaultView;let r=(0,s.i)(_);const c=D=>r?-D.deltaX:D.deltaX;return(0,m.createGesture)({el:_,gestureName:"goback-swipe",gesturePriority:101,threshold:10,canStart:D=>(r=(0,s.i)(_),(D=>{const{startX:O}=D;return r?O>=e.innerWidth-50:O<=50})(D)&&u()),onStart:o,onMove:D=>{const O=c(D)/e.innerWidth;n(O)},onEnd:D=>{const M=c(D),O=e.innerWidth,E=M/O,P=(D=>r?-D.velocityX:D.velocityX)(D),A=P>=0&&(P>.2||M>O/2),L=(A?1-E:E)*O;let C=0;if(L>5){const R=L/Math.abs(P);C=Math.min(R,540)}t(A,E<=0?.01:(0,v.j)(0,E,.9999),C)}})}},2935:(w,p,h)=>{h.d(p,{w:()=>v});const v=(g,l,_)=>{if(typeof MutationObserver>"u")return;const u=new MutationObserver(o=>{_(s(o,l))});return u.observe(g,{childList:!0,subtree:!0}),u},s=(g,l)=>{let _;return g.forEach(u=>{for(let o=0;o{if(1!==g.nodeType)return;const _=g;return(_.tagName===l.toUpperCase()?[_]:Array.from(_.querySelectorAll(l))).find(o=>o.value===_.value)}},385:(w,p,h)=>{h.d(p,{l:()=>m});var v=h(4438),s=h(7863);let m=(()=>{var g;class l{constructor(){this.title="Header Title"}ngOnInit(){}}return(g=l).\u0275fac=function(u){return new(u||g)},g.\u0275cmp=v.VBU({type:g,selectors:[["app-header"]],inputs:{title:"title"},decls:5,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"]],template:function(u,o){1&u&&(v.j41(0,"ion-header",0)(1,"ion-toolbar"),v.nrm(2,"ion-menu-button",1),v.j41(3,"ion-title"),v.EFF(4),v.k0s()()()),2&u&&(v.Y8G("translucent",!0),v.R7$(4),v.JRh(o.title))},dependencies:[s.eU,s.MC,s.BC,s.ai]}),l})()},6560:(w,p,h)=>{h.d(p,{x:()=>l});var v=h(467),s=h(4262),m=h(4438),g=h(1626);let l=(()=>{var _;class u{constructor(n,t){this.firestore=n,this.http=t,this.url_cpu="https://devprobeapi.onrender.com/flame_graph_date",this.url_mem="https://devprobeapi.onrender.com/flame_graph_memory_date"}getProducts(n){var t=this;return(0,v.A)(function*(){try{const e=(0,s.rJ)(t.firestore,"teams",n,"products");return(yield(0,s.GG)(e)).docs.map(i=>i.data())}catch(e){return console.log(e),[]}})()}getDates(n,t,e){var r=this;return(0,v.A)(function*(){try{e||(e="cpu_usage");const i=(0,s.rJ)(r.firestore,"teams",n,"products",t,e);return(yield(0,s.GG)(i)).docs.map(a=>a.id)}catch(i){return console.log(i),[]}})()}getFlameGraphByDate(n,t,e,r){var i=this;return(0,v.A)(function*(){try{let c={team:n,product:t,date:e};return r?yield i.http.post(i.url_mem,c).toPromise():yield i.http.post(i.url_cpu,c).toPromise()}catch{return{}}})()}}return(_=u).\u0275fac=function(n){return new(n||_)(m.KVO(s._7),m.KVO(g.Qq))},_.\u0275prov=m.jDH({token:_,factory:_.\u0275fac,providedIn:"root"}),u})()},201:(w,p,h)=>{h.d(p,{p:()=>l});var v=h(467),s=h(4262),m=h(4438),g=h(1626);let l=(()=>{var _;class u{constructor(n,t){this.firestore=n,this.httpClient=t,this.url="https://devprobeapi.onrender.com/"}syncRepo(n,t,e,r,i){var c=this;return(0,v.A)(function*(){const a=(0,s.H9)(c.firestore,"teams",n),f=yield(0,s.x7)(a);if(f.exists()){const d=f.data();d.gitHub={key:t,repo:e,branch:r,owner:i},yield(0,s.BN)(a,d)}})()}getSyncRepo(n){var t=this;return(0,v.A)(function*(){const e=(0,s.H9)(t.firestore,"teams",n),r=yield(0,s.x7)(e);return r.exists()?r.data().gitHub:null})()}getFiles(n){var t=this;return(0,v.A)(function*(){const e=yield t.httpClient.post(t.url+"github_repo",{auth:n.key,repo:n.repo,branch:n.branch,owner:n.owner}).toPromise();if(console.log(e),e){let r=e.paths;return r=r.filter(i=>!i.includes(".git")),r=r.filter(i=>!i.includes("node_modules")),r=r.filter(i=>!i.includes(".idea")),r=r.filter(i=>i.includes(".")),r}return[]})()}getContentFromFilePath(n,t){var e=this;return(0,v.A)(function*(){const r=yield e.httpClient.post(e.url+"github_file",{auth:n.key,repo:n.repo,owner:n.owner,path:t}).toPromise();return console.log(r),r?r.content:""})()}}return(_=u).\u0275fac=function(n){return new(n||_)(m.KVO(s._7),m.KVO(g.Qq))},_.\u0275prov=m.jDH({token:_,factory:_.\u0275fac,providedIn:"root"}),u})()},4624:(w,p,h)=>{h.d(p,{I:()=>g});var v=h(467),s=h(4262),m=h(4438);let g=(()=>{var l;class _{constructor(o){this.firestore=o}saveIncident(o,n,t,e){var r=this;return(0,v.A)(function*(){try{console.log(e);const i=(0,s.H9)(r.firestore,"teams",o,"products",n,"incident",t),c=yield(0,s.x7)(i);if(c.exists()){const a=c.data();return a.incidents.push({...e}),yield(0,s.BN)(i,a),!0}return console.log("No such document!"),yield(0,s.BN)(i,{incidents:[e]}),!0}catch(i){return console.log(i),!1}})()}getIncidents(o,n,t){var e=this;return(0,v.A)(function*(){const r=(0,s.H9)(e.firestore,"teams",o,"products",n,"incident",t),i=yield(0,s.x7)(r);if(i.exists()){let c=i.data();return console.log(c),c.incidents}return[]})()}updateIncident(o,n,t,e){var r=this;return(0,v.A)(function*(){const i=(0,s.H9)(r.firestore,"teams",o,"products",n,"incident",t),c=yield(0,s.x7)(i);if(c.exists()){const a=c.data();let f=a.incidents;console.log(f);for(let d=0;d<=f.length;d++)if(console.log(f[d].title),console.log(e.title),f[d].title===e.title)return console.log("found"),f[d]=e,yield(0,s.BN)(i,a),!0}return!1})()}}return(l=_).\u0275fac=function(o){return new(o||l)(m.KVO(s._7))},l.\u0275prov=m.jDH({token:l,factory:l.\u0275fac,providedIn:"root"}),_})()},3661:(w,p,h)=>{h.d(p,{e:()=>l});var v=h(467),s=h(4438),m=h(4262),g=h(1626);let l=(()=>{var _;class u{constructor(n,t){this.firestore=n,this.http=t,this.ipApiURL="https://cors-ea3m.onrender.com/http://ip-api.com/json/"}getLocationDestSrc(n){var t=this;return(0,v.A)(function*(){var e,r,i,c,a,f,d,y;if(!n)return n;const D=t.http.get(t.ipApiURL+n.dst_addr).toPromise(),M=t.http.get(t.ipApiURL+n.src_addr).toPromise(),O=yield D,E=yield M;return n.dst_city=null!==(e=O.city)&&void 0!==e?e:"No city found",n.dst_country=null!==(r=O.country)&&void 0!==r?r:"No country found",n.dst_latitude=null!==(i=O.lat)&&void 0!==i?i:0,n.dst_longitude=null!==(c=O.lon)&&void 0!==c?c:0,n.src_city=null!==(a=E.city)&&void 0!==a?a:"No city found",n.src_country=null!==(f=E.country)&&void 0!==f?f:"No country found",n.src_latitude=null!==(d=E.lat)&&void 0!==d?d:0,n.src_longitude=null!==(y=E.lon)&&void 0!==y?y:0,n})()}getLocationFrom(n){var t=this;return(0,v.A)(function*(){if(!n)return n;let e=n.result;for(let f=0;f{h.d(p,{N:()=>l});var v=h(467),s=h(4262),m=h(4438),g=h(1626);let l=(()=>{var _;class u{constructor(n,t){this.firestore=n,this.http=t,this.ipApiURL="https://cors-ea3m.onrender.com/http://ip-api.com/json/"}getLocation(n){var t=this;return(0,v.A)(function*(){console.log(n);const r=yield t.http.get(t.ipApiURL+n[0].dst_addr).toPromise();for(let a=0;at.http.get(t.ipApiURL+a.from).toPromise());return(yield Promise.all(i)).forEach((a,f)=>{n[f].fromLatitude=a.lat,n[f].fromLongitude=a.lon,n[f].cityFrom=a.city,n[f].countryFrom=a.country}),console.log(n),n})()}saveLocationResults(n,t,e,r){var i=this;return(0,v.A)(function*(){try{console.log(r,"ripeData");const c=(0,s.rJ)(i.firestore,"teams",n,"products",t,"ripe"),a=(0,s.H9)(c,e),f=r.map(d=>({from:d.from,dst_addr:d.dst_addr,latency:d.latency,cityFrom:d.cityFrom,countryFrom:d.countryFrom,cityTo:d.cityTo,countryTo:d.countryTo,fromLatitude:d.fromLatitude,fromLongitude:d.fromLongitude,toLatitude:d.toLatitude,toLongitude:d.toLongitude,id:d.id}));return yield(0,s.BN)(a,{data:f}),console.log("Data saved",{data:f}),!0}catch(c){return console.log(c),!1}})()}}return(_=u).\u0275fac=function(n){return new(n||_)(m.KVO(s._7),m.KVO(g.Qq))},_.\u0275prov=m.jDH({token:_,factory:_.\u0275fac,providedIn:"root"}),u})()},6241:(w,p,h)=>{h.d(p,{b:()=>g});var v=h(467),s=h(4262),m=h(4438);let g=(()=>{var l;class _{constructor(o){this.firestore=o}addProduct(o,n){var t=this;return(0,v.A)(function*(){try{console.log(o);const e=(0,s.H9)(t.firestore,"teams",n,"products",o.productObjective);return yield(0,s.BN)(e,o),!0}catch(e){return console.log(e),!1}})()}getProducts(o){var n=this;return(0,v.A)(function*(){try{const t=(0,s.rJ)(n.firestore,"teams",o,"products");return(yield(0,s.GG)(t)).docs.map(r=>r.data())}catch(t){return console.log(t),[]}})()}removeProduct(o,n){var t=this;return(0,v.A)(function*(){try{const e=(0,s.H9)(t.firestore,"teams",o,"products",n);return yield(0,s.kd)(e),!0}catch(e){return console.log(e),!1}})()}}return(l=_).\u0275fac=function(o){return new(o||l)(m.KVO(s._7))},l.\u0275prov=m.jDH({token:l,factory:l.\u0275fac,providedIn:"root"}),_})()},2588:(w,p,h)=>{h.d(p,{N:()=>l});var v=h(467),s=h(4262),m=h(4438),g=h(1626);let l=(()=>{var _;class u{constructor(n,t){this.http=n,this.firestore=t,this.measurementsUrl="https://cors-ea3m.onrender.com/https://atlas.ripe.net/api/v2/measurements/",this.measurementID=""}sendTraceRequest(n,t,e,r){var i=this;return(0,v.A)(function*(){console.log("Sending trace request");try{let c={definitions:[{target:n,description:t,type:e,af:4,is_oneoff:!0,protocol:"TCP"}],probes:[]};console.log(r);let a=r.split(",").length-1,f=(r=r.slice(0,-1)).split(","),d=[];for(let M=0;M({id:i.measurementID,dst_addr:d.dst_addr,dst_city:d.dst_city,dst_country:d.dst_country,dst_latitude:d.dst_latitude,dst_longitude:d.dst_longitude,src_addr:d.src_addr,src_city:d.src_city,src_country:d.src_country,src_latitude:d.src_latitude,src_longitude:d.src_longitude,result:d.result}));return yield(0,s.BN)(a,{data:f}),!0}catch(c){return console.log(c),!1}})()}getHistoryResults(n,t){var e=this;return(0,v.A)(function*(){const i=(0,s.rJ)(e.firestore,"teams/"+n+"/products/"+t+"/ripe_trace"),c=yield(0,s.GG)(i);let a=[];return c.docs.forEach(f=>{a.push({id:f.id,data:f.data()})}),console.log(a),a})()}getAllResultsByDescription(n,t,e){var r=this;return(0,v.A)(function*(){try{let i="teams/"+n+"/products/"+t+"/ripe_trace";console.log(i);let c=(0,s.H9)(r.firestore,i,e);return(yield(0,s.x7)(c)).data()}catch(i){return console.log(i),[]}})()}}return(_=u).\u0275fac=function(n){return new(n||_)(m.KVO(g.Qq),m.KVO(s._7))},_.\u0275prov=m.jDH({token:_,factory:_.\u0275fac,providedIn:"root"}),u})()},9640:(w,p,h)=>{h.d(p,{Q:()=>_});var v=h(467),s=h(1985),m=h(4262),g=h(4438),l=h(1626);let _=(()=>{var u;class o{constructor(t,e){this.http=t,this.firestore=e,this.measurementsUrl="https://cors-ea3m.onrender.com/https://atlas.ripe.net/api/v2/measurements/",this.measurementID=""}sendMeasurementRequest(t,e,r,i){var c=this;return(0,v.A)(function*(){let a=i.split(",").length-1;i=i.slice(0,-1);try{let f={definitions:[{target:t,description:"ping",type:"ping",af:4,is_oneoff:!0}],probes:[{requested:a,type:"probes",value:i}]},d={Authorization:"Key 92530695-134f-4cbc-b7c3-ec130f3719b0"};console.log(f);let y=yield c.http.post(c.measurementsUrl,f,{headers:d}).toPromise();return console.log(y),c.measurementID=y.measurements[0],c.measurementID}catch(f){return console.log(f),!1}})()}getMeasurementResults(t){var e=this;return(0,v.A)(function*(){t&&(e.measurementID=t);try{let r={Authorization:"Key 92530695-134f-4cbc-b7c3-ec130f3719b0"};return""===e.measurementID?(console.log("No measurement ID"),!1):e.http.get(e.measurementsUrl+e.measurementID+"/results/",{headers:r})}catch(r){return console.log(r),new s.c}})()}saveMeasurementResults(t,e,r,i){var c=this;return(0,v.A)(function*(){try{const a=(0,m.rJ)(c.firestore,"teams",t,"products",e,"ripe"),f=(0,m.H9)(a,r),d=i.map((y,D)=>({id:c.measurementID,from:y.from,dst_addr:y.dst_addr,latency:y.latency}));return yield(0,m.BN)(f,{data:d}),!0}catch(a){return console.log(a),!1}})()}getAllResultsByDescription(t,e,r){var i=this;return(0,v.A)(function*(){try{let c="teams/"+t+"/products/"+e+"/ripe";console.log(c);let a=(0,m.H9)(i.firestore,c,r);return(yield(0,m.x7)(a)).data()}catch(c){return console.log(c),[]}})()}getHistoryResults(t,e){var r=this;return(0,v.A)(function*(){const c=(0,m.rJ)(r.firestore,"teams/"+t+"/products/"+e+"/ripe"),a=yield(0,m.GG)(c);let f=[];return a.docs.forEach(d=>{f.push({id:d.id,data:d.data()})}),console.log(f),f})()}deleteHistory(t,e,r){var i=this;return(0,v.A)(function*(){const a=(0,m.H9)(i.firestore,"teams/"+t+"/products/"+e+"/ripe",r);try{return yield(0,m.kd)(a),!0}catch(f){return console.log(f),!1}})()}}return(u=o).\u0275fac=function(t){return new(t||u)(g.KVO(l.Qq),g.KVO(m._7))},u.\u0275prov=g.jDH({token:u,factory:u.\u0275fac,providedIn:"root"}),o})()},9536:(w,p,h)=>{h.d(p,{Q:()=>g});var v=h(467),s=h(4262),m=h(4438);let g=(()=>{var l;class _{constructor(o){this.firestore=o}addSystemTest(o,n,t,e){var r=this;return(0,v.A)(function*(){const i=(0,s.H9)(r.firestore,"teams",o,"products",n,"software_testing","integration_tests"),c=yield(0,s.x7)(i);if(c.exists()){const a=c.data();if(!a[t])return a[t]=[e],yield(0,s.BN)(i,a),void console.log("Document created with ID: ",i.id);a[t].push(e),yield(0,s.BN)(i,a),console.log("Document updated with ID: ",c.id)}else console.log("No such document!"),yield(0,s.BN)(i,{[t]:[e]}),console.log("Document created with ID: ",i.id)})()}getIntegrationTests(o,n,t){var e=this;return(0,v.A)(function*(){const r=(0,s.H9)(e.firestore,"teams",o,"products",n,"software_testing","integration_tests"),i=yield(0,s.x7)(r);return i.exists()?i.data()[t]:[]})()}updateIntegrationTestState(o,n,t,e,r){var i=this;return(0,v.A)(function*(){const c=(0,s.H9)(i.firestore,"teams",o,"products",n,"software_testing","integration_tests"),a=yield(0,s.x7)(c);if(a.exists()){const f=a.data();for(let d=0;d{h.d(p,{h:()=>g});var v=h(467),s=h(4262),m=h(4438);let g=(()=>{var l;class _{constructor(o){this.firestore=o}addSystemTest(o,n,t,e){var r=this;return(0,v.A)(function*(){const i=(0,s.H9)(r.firestore,"teams",o,"products",n,"software_testing","system_tests"),c=yield(0,s.x7)(i);if(c.exists()){const a=c.data();if(!a[t])return a[t]=[e],yield(0,s.BN)(i,a),void console.log("Document created with ID: ",i.id);a[t].push(e),yield(0,s.BN)(i,a),console.log("Document updated with ID: ",c.id)}else console.log("No such document!"),yield(0,s.BN)(i,{[t]:[e]}),console.log("Document created with ID: ",i.id)})()}getSystemTest(o,n,t){var e=this;return(0,v.A)(function*(){const r=(0,s.H9)(e.firestore,"teams",o,"products",n,"software_testing","system_tests"),i=yield(0,s.x7)(r);return i.exists()?i.data()[t]:[]})()}saveSystemTest(o,n,t,e){var r=this;return(0,v.A)(function*(){const i=(0,s.H9)(r.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),c=new Date,a=`${c.getFullYear()}-${c.getMonth()+1}-${c.getDate()} ${c.getHours()}:${c.getMinutes()}:${c.getSeconds()}`;console.log(a);const f=yield(0,s.x7)(i);if(f.exists()){let d=f.data();d[a]={systemTest:e},d[a].productStep=t,yield(0,s.BN)(i,d)}else yield(0,s.BN)(i,{[a]:{systemTest:e,productStep:t}})})()}getSystemTestHistoryByStep(o,n,t){var e=this;return(0,v.A)(function*(){const r=(0,s.H9)(e.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),i=yield(0,s.x7)(r);if(i.exists()){const c=i.data();return Object.keys(c).filter(f=>c[f].productStep===t).map(f=>c[f].systemTest)}return[]})()}getSystemTestHistoryByTitle(o,n,t,e){var r=this;return(0,v.A)(function*(){const i=(0,s.H9)(r.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),c=yield(0,s.x7)(i);let a=[];if(c.exists()){const f=c.data();for(let d in f)f[d].systemTest.title===e&&f[d].productStep===t&&a.push({timestamp:d,systemTest:f[d].systemTest})}return a})()}getSystemTestByTimestamp(o,n,t,e,r){var i=this;return(0,v.A)(function*(){const c=(0,s.H9)(i.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),a=yield(0,s.x7)(c);if(a.exists()){const f=a.data();for(let d in f)if(f[d].systemTest.title===e&&d===r&&f[d].productStep===t)return f[d].systemTest}return{}})()}deleteSystemTestHistoryByKey(o,n,t,e,r){var i=this;return(0,v.A)(function*(){const c=(0,s.H9)(i.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),a=yield(0,s.x7)(c);if(a.exists()){const f=a.data();for(let d in f)f[d].systemTest.title===e&&d===r&&f[d].productStep===t&&delete f[d];yield(0,s.BN)(c,f)}})()}getSystemTestHistory(o,n){var t=this;return(0,v.A)(function*(){const e=(0,s.H9)(t.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),r=yield(0,s.x7)(e);return r.exists()?r.data():{}})()}deleteSystemTest(o,n,t,e){var r=this;return(0,v.A)(function*(){let i=(0,s.H9)(r.firestore,"teams",o,"products",n,"software_testing","system_tests"),c=yield(0,s.x7)(i);if(c.exists()){let a=c.data();a[t]=a[t].filter(f=>f.title!==e.title),yield(0,s.BN)(i,a)}if(i=(0,s.H9)(r.firestore,"teams",o,"products",n,"software_testing","system_tests_history"),c=yield(0,s.x7)(i),c.exists()){let a=c.data();for(let f in a)console.log(a[f].systemTest.title),a[f].systemTest.title===e.title&&delete a[f];yield(0,s.BN)(i,a)}})()}}return(l=_).\u0275fac=function(o){return new(o||l)(m.KVO(s._7))},l.\u0275prov=m.jDH({token:l,factory:l.\u0275fac,providedIn:"root"}),_})()},1854:(w,p,h)=>{h.d(p,{I:()=>g});var v=h(467),s=h(4262),m=h(4438);let g=(()=>{var l;class _{constructor(o){this.firestore=o}addUnitTest(o,n,t,e){var r=this;return(0,v.A)(function*(){const i=(0,s.H9)(r.firestore,"teams",o,"products",n,"software_testing","unit_tests"),c=yield(0,s.x7)(i);if(c.exists()){let a=c.data();if(!a[t])return a[t]=[e],yield(0,s.BN)(i,a),void console.log("Document created with ID: ",i.id);for(let f=0;f
-
+
-
+