From 52234c7c49bd232cd2db339ff84d6d7edb998a8a Mon Sep 17 00:00:00 2001
From: Guilhermo Pazuch <1490938+gpazuch@users.noreply.github.com>
Date: Tue, 9 May 2023 10:56:14 -0300
Subject: [PATCH] (feat/fix): Enable Partial Sink Update (#2230)
* wip: sink view init
* wip: sink view + edit
* wip: config editor
* wip: save
* fix edit config & save
* update sink config view css
* fix json format
---
ui/src/app/pages/pages-routing.module.ts | 6 +
ui/src/app/pages/pages.module.ts | 2 +
.../pages/sinks/list/sink.list.component.html | 2 +-
.../pages/sinks/list/sink.list.component.ts | 7 +
.../pages/sinks/view/sink.view.component.html | 42 ++++++
.../pages/sinks/view/sink.view.component.scss | 72 ++++++++++
.../sinks/view/sink.view.component.spec.ts | 25 ++++
.../pages/sinks/view/sink.view.component.ts | 128 ++++++++++++++++++
.../sink-config/sink-config.component.html | 45 ++++++
.../sink-config/sink-config.component.scss | 3 +
.../sink-config/sink-config.component.spec.ts | 25 ++++
.../sink/sink-config/sink-config.component.ts | 85 ++++++++++++
.../sink-details/sink-details.component.html | 94 +++++++++++++
.../sink-details/sink-details.component.scss | 5 +
.../sink-details.component.spec.ts | 25 ++++
.../sink-details/sink-details.component.ts | 73 ++++++++++
ui/src/app/shared/shared.module.ts | 6 +
ui/src/assets/text/strings.ts | 3 +
18 files changed, 647 insertions(+), 1 deletion(-)
create mode 100644 ui/src/app/pages/sinks/view/sink.view.component.html
create mode 100644 ui/src/app/pages/sinks/view/sink.view.component.scss
create mode 100644 ui/src/app/pages/sinks/view/sink.view.component.spec.ts
create mode 100644 ui/src/app/pages/sinks/view/sink.view.component.ts
create mode 100644 ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.html
create mode 100644 ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.scss
create mode 100644 ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.spec.ts
create mode 100644 ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.ts
create mode 100644 ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.html
create mode 100644 ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.scss
create mode 100644 ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.spec.ts
create mode 100644 ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.ts
diff --git a/ui/src/app/pages/pages-routing.module.ts b/ui/src/app/pages/pages-routing.module.ts
index e0d67ac19..96ba9881b 100644
--- a/ui/src/app/pages/pages-routing.module.ts
+++ b/ui/src/app/pages/pages-routing.module.ts
@@ -25,6 +25,7 @@ import { DashboardComponent } from 'app/pages/dashboard/dashboard.component';
import { DatasetAddComponent } from 'app/pages/datasets/add/dataset.add.component';
import { ProfileComponent } from './profile/profile.component';
import { AgentPolicyViewComponent } from 'app/pages/datasets/policies.agent/view/agent.policy.view.component';
+import { SinkViewComponent } from './sinks/view/sink.view.component';
const children = [
{
@@ -116,6 +117,11 @@ const children = [
component: SinkAddComponent,
data: {breadcrumb: 'Edit Sink'},
},
+ {
+ path: 'view/:id',
+ component: SinkViewComponent,
+ data: {breadcrumb: 'View Sink'},
+ },
],
},
{
diff --git a/ui/src/app/pages/pages.module.ts b/ui/src/app/pages/pages.module.ts
index c041eb78d..62904cb14 100644
--- a/ui/src/app/pages/pages.module.ts
+++ b/ui/src/app/pages/pages.module.ts
@@ -68,6 +68,7 @@ import { DashboardModule } from './dashboard/dashboard.module';
import { AgentViewComponent } from './fleet/agents/view/agent.view.component';
import { PagesRoutingModule } from './pages-routing.module';
import { PagesComponent } from './pages.component';
+import { SinkViewComponent } from './sinks/view/sink.view.component';
@NgModule({
imports: [
@@ -150,6 +151,7 @@ import { PagesComponent } from './pages.component';
SinkAddComponent,
SinkDetailsComponent,
SinkDeleteComponent,
+ SinkViewComponent,
// DEV SHOWCASE
ShowcaseComponent,
],
diff --git a/ui/src/app/pages/sinks/list/sink.list.component.html b/ui/src/app/pages/sinks/list/sink.list.component.html
index 6e7f8852c..3bdddacdf 100644
--- a/ui/src/app/pages/sinks/list/sink.list.component.html
+++ b/ui/src/app/pages/sinks/list/sink.list.component.html
@@ -86,7 +86,7 @@
{{ strings.list.header }}
>