From f5c092d00691458060c24b37d2e09d5816001f88 Mon Sep 17 00:00:00 2001 From: ZhangZihao Date: Wed, 13 Nov 2019 10:27:04 +0800 Subject: tools code Change-Id: Ic562e7689255ce06dfdb793e38fab077b7cf3641 Issue-ID: DCAEGEN2-1877 Signed-off-by: ZhangZihao --- .../admin/src/src/app/app-routing.module.ts | 5 +- .../admin/src/src/app/app.module.ts | 19 ++- .../shared/components/Button/button.component.html | 6 +- .../shared/components/Button/button.component.ts | 8 +- .../shared/layout/sidebar/sidebar.component.html | 3 +- .../app/shared/modules/table/table.component.html | 4 +- .../app/shared/modules/table/table.component.ts | 15 +- .../tools/modal-tools/modal-tools.component.css | 58 +++++++ .../tools/modal-tools/modal-tools.component.html | 125 ++++++++++++++ .../modal-tools/modal-tools.component.spec.ts | 47 ++++++ .../tools/modal-tools/modal-tools.component.ts | 98 +++++++++++ .../tool-add-modal/tool-add-modal.component.css | 34 ++++ .../tool-add-modal/tool-add-modal.component.html | 63 +++++++ .../tool-add-modal.component.spec.ts | 47 ++++++ .../tool-add-modal/tool-add-modal.component.ts | 123 ++++++++++++++ .../src/src/app/views/tools/tools.component.css | 21 +++ .../src/src/app/views/tools/tools.component.html | 58 +++++++ .../src/app/views/tools/tools.component.spec.ts | 47 ++++++ .../src/src/app/views/tools/tools.component.ts | 184 +++++++++++++++++++++ .../admin/src/src/assets/i18n/en-us.json | 6 +- 20 files changed, 951 insertions(+), 20 deletions(-) create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.css create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.html create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.spec.ts create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/modal-tools/modal-tools.component.ts create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tool-add-modal/tool-add-modal.component.css create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tool-add-modal/tool-add-modal.component.html create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tool-add-modal/tool-add-modal.component.spec.ts create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tool-add-modal/tool-add-modal.component.ts create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tools.component.css create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tools.component.html create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tools.component.spec.ts create mode 100644 components/datalake-handler/admin/src/src/app/views/tools/tools.component.ts (limited to 'components/datalake-handler/admin') diff --git a/components/datalake-handler/admin/src/src/app/app-routing.module.ts b/components/datalake-handler/admin/src/src/app/app-routing.module.ts index 71c11201..ae2f9b6e 100644 --- a/components/datalake-handler/admin/src/src/app/app-routing.module.ts +++ b/components/datalake-handler/admin/src/src/app/app-routing.module.ts @@ -35,9 +35,8 @@ import { KafkaComponent } from "./views/kafka/kafka.component"; import { TopicsComponent } from "./views/topics/topics.component"; import { DatabaseComponent } from "./views/database/database.component"; import { AboutComponent } from "./views/about/about.component"; -import { DashboardSettingComponent } from './views/dashboard-setting/dashboard-setting.component'; -import { DashboardListComponent } from './views/dashboard-setting/dashboard-list/dashboard-list.component'; import { TemplateComponent } from './views/dashboard-setting/template/template.component'; +import {ToolsComponent} from "./views/tools/tools.component"; const routes: Routes = [ { path: "", redirectTo: "/feeder", pathMatch: "full" }, @@ -47,7 +46,7 @@ const routes: Routes = [ { path: "topics", component: TopicsComponent }, { path: "database", component: DatabaseComponent }, { path: "about", component: AboutComponent }, - { path: 'dashboard-setting/dashboard-list', component: DashboardListComponent }, + { path: 'tools', component: ToolsComponent }, { path: 'dashboard-setting/template', component: TemplateComponent }, ]; diff --git a/components/datalake-handler/admin/src/src/app/app.module.ts b/components/datalake-handler/admin/src/src/app/app.module.ts index 3c52716c..927f229a 100644 --- a/components/datalake-handler/admin/src/src/app/app.module.ts +++ b/components/datalake-handler/admin/src/src/app/app.module.ts @@ -65,6 +65,12 @@ import { HdfsComponent } from "./views/database/database-list/dbs-modal/hdfs/hdf import { DatabaseAddModalComponent } from "./views/database/database-list/database-add-modal/database-add-modal.component"; import { ElasticsearchComponent } from "./views/database/database-list/dbs-modal/elasticsearch/elasticsearch.component"; import { DruidComponent } from "./views/database/database-list/dbs-modal/druid/druid.component"; +import { KafkaListComponent } from './views/kafka/kafka-list/kafka-list.component'; +import { NewKafkaModalComponent } from './views/kafka/kafka-list/new-kafka-modal/new-kafka-modal.component'; +import { EditKafkaModalComponent } from './views/kafka/kafka-list/edit-kafka-modal/edit-kafka-modal.component'; +import { ToolsComponent } from './views/tools/tools.component'; +import { ModalToolsComponent } from './views/tools/modal-tools/modal-tools.component'; +import { ToolAddModalComponent } from './views/tools/tool-add-modal/tool-add-modal.component'; // Modals import { TopicDetailModalComponent } from "./views/topics/topic-list/topic-detail-modal/topic-detail-modal.component"; @@ -94,10 +100,6 @@ import { ModalDemoComponent } from "./views/test/modal-demo/modal-demo.component import { KafkaComponent } from './views/kafka/kafka.component'; // Angular SVG Icon import { AngularSvgIconModule } from "angular-svg-icon"; -import { KafkaListComponent } from './views/kafka/kafka-list/kafka-list.component'; -import { NewKafkaModalComponent } from './views/kafka/kafka-list/new-kafka-modal/new-kafka-modal.component'; -import { EditKafkaModalComponent } from './views/kafka/kafka-list/edit-kafka-modal/edit-kafka-modal.component'; - @NgModule({ declarations: [ @@ -139,7 +141,10 @@ import { EditKafkaModalComponent } from './views/kafka/kafka-list/edit-kafka-mod KafkaComponent, KafkaListComponent, NewKafkaModalComponent, - EditKafkaModalComponent + EditKafkaModalComponent, + ToolsComponent, + ModalToolsComponent, + ToolAddModalComponent ], imports: [ BrowserModule, @@ -178,7 +183,9 @@ import { EditKafkaModalComponent } from './views/kafka/kafka-list/edit-kafka-mod ModalDemoComponent, KafkaComponent, NewKafkaModalComponent, - EditKafkaModalComponent + EditKafkaModalComponent, + ToolAddModalComponent, + ModalToolsComponent ] }) export class AppModule {} diff --git a/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.html b/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.html index 3e753df3..7986886a 100644 --- a/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.html +++ b/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.html @@ -15,12 +15,14 @@ + - \ No newline at end of file + + diff --git a/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.ts b/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.ts index b01260e9..c78bfe51 100644 --- a/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.ts +++ b/components/datalake-handler/admin/src/src/app/shared/components/Button/button.component.ts @@ -20,9 +20,11 @@ * * @author Xu Ran * + * @contributor Chunmeng Guo + * */ -import { Component, OnInit, Input } from '@angular/core'; +import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core'; @Component({ selector: 'app-button', @@ -42,6 +44,7 @@ export class ButtonComponent implements OnInit { @Input() text: string; @Input() style: string; @Input() color: string; + @Output() btnAction = new EventEmitter() buttonstyle: number; buttoncolor: number; constructor() { } @@ -72,4 +75,7 @@ export class ButtonComponent implements OnInit { } } + buttonClick(string) { + this.btnAction.emit(string); + } } diff --git a/components/datalake-handler/admin/src/src/app/shared/layout/sidebar/sidebar.component.html b/components/datalake-handler/admin/src/src/app/shared/layout/sidebar/sidebar.component.html index 42835a54..2e463883 100644 --- a/components/datalake-handler/admin/src/src/app/shared/layout/sidebar/sidebar.component.html +++ b/components/datalake-handler/admin/src/src/app/shared/layout/sidebar/sidebar.component.html @@ -59,8 +59,7 @@ limitations under the License.