From 242406ce47238733bde676fd0d8ff6a4afd5c47d Mon Sep 17 00:00:00 2001 From: Meina Zhou Date: Wed, 20 Mar 2019 11:27:52 +0800 Subject: [PATCH] modify create replication rule Signed-off-by: Meina Zhou --- .../create-edit-endpoint.component.spec.ts | 4 +- .../create-edit-endpoint.component.ts | 4 +- .../create-edit-rule.component.html | 154 +++++---- .../create-edit-rule.component.scss | 27 +- .../create-edit-rule.component.spec.ts | 136 +++----- .../create-edit-rule.component.ts | 291 ++++-------------- .../src/endpoint/endpoint.component.spec.ts | 20 +- .../lib/src/endpoint/endpoint.component.ts | 4 +- .../list-replication-rule.component.spec.ts | 70 +---- .../replication/replication.component.spec.ts | 101 +----- src/portal/lib/src/service/interface.ts | 25 +- .../lib/src/service/replication.service.ts | 3 +- src/portal/src/i18n/lang/en-us-lang.json | 7 +- src/portal/src/i18n/lang/es-es-lang.json | 7 +- src/portal/src/i18n/lang/fr-fr-lang.json | 7 +- src/portal/src/i18n/lang/pt-br-lang.json | 7 +- src/portal/src/i18n/lang/zh-cn-lang.json | 7 +- 17 files changed, 270 insertions(+), 604 deletions(-) diff --git a/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.spec.ts b/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.spec.ts index 1f9ab77fd..a68e01b00 100644 --- a/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.spec.ts +++ b/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.spec.ts @@ -21,12 +21,12 @@ import { IServiceConfig, SERVICE_CONFIG } from "../service.config"; describe("CreateEditEndpointComponent (inline template)", () => { let mockData: Endpoint = { id: 1, - endpoint: "https://10.117.4.151", + url: "https://10.117.4.151", name: "target_01", username: "admin", password: "", insecure: false, - type: 0 + type: "harbor" }; let comp: CreateEditEndpointComponent; diff --git a/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts b/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts index b23d991b6..760e40cdb 100644 --- a/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts +++ b/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts @@ -98,12 +98,12 @@ export class CreateEditEndpointComponent initEndpoint(): Endpoint { return { - endpoint: "", + url: "", name: "", username: "", password: "", insecure: false, - type: 0 + type: "" }; } diff --git a/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html b/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html index 12c1ce04a..0952b5e45 100644 --- a/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html +++ b/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html @@ -2,8 +2,8 @@