summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/modals
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/view-models/modals')
-rw-r--r--catalog-ui/src/app/view-models/modals/confirmation-modal/confirmation-modal-view.html6
-rw-r--r--catalog-ui/src/app/view-models/modals/conformance-level-modal/conformance-level-modal-view.html4
-rw-r--r--catalog-ui/src/app/view-models/modals/email-modal/email-modal-view.html4
-rw-r--r--catalog-ui/src/app/view-models/modals/error-modal/error-403-view.html2
-rw-r--r--catalog-ui/src/app/view-models/modals/error-modal/error.less9
-rw-r--r--catalog-ui/src/app/view-models/modals/icons-modal/icons-modal-view.html4
-rw-r--r--catalog-ui/src/app/view-models/modals/message-modal/message-client-modal/client-message-modal-view.html4
-rw-r--r--catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts2
-rw-r--r--catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html4
-rw-r--r--catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view-model.ts37
-rw-r--r--catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view.html4
11 files changed, 45 insertions, 35 deletions
diff --git a/catalog-ui/src/app/view-models/modals/confirmation-modal/confirmation-modal-view.html b/catalog-ui/src/app/view-models/modals/confirmation-modal/confirmation-modal-view.html
index 09c27f8cd3..e6b31d5a47 100644
--- a/catalog-ui/src/app/view-models/modals/confirmation-modal/confirmation-modal-view.html
+++ b/catalog-ui/src/app/view-models/modals/confirmation-modal/confirmation-modal-view.html
@@ -1,4 +1,4 @@
-<sdc-modal modal="modalInstanceConfirmation" type="classic" class="w-sdc-modal-confirmation modal-type-{{confirmationModalModel.type}}" header="{{confirmationModalModel.title}}" show-close-button="true">
+<ng1-modal modal="modalInstanceConfirmation" type="classic" class="w-sdc-modal-confirmation modal-type-{{confirmationModalModel.type}}" header="{{confirmationModalModel.title}}" show-close-button="true">
<form novalidate class="w-sdc-form" name="editForm">
<label class="i-sdc-form-label required w-sdc-modal-label" data-ng-bind-html="confirmationModalModel.message"></label>
@@ -24,6 +24,6 @@
<div class="w-sdc-modal-footer classic">
<button class="tlv-btn {{okButtonColor}}" data-tests-id="OK" data-ng-click="ok()" data-ng-disabled="confirmationModalModel.showComment===true && (!comment.text || comment.text && comment.text.length===0)">OK</button>
<button class="tlv-btn grey" data-ng-if="hideCancelButton===false" data-tests-id="Cancel" data-ng-click="cancel()" >Cancel</button>
- <button class="tlv-btn blue add-property-add-another" data-ng-if="isNew" data-ng-click="saveAndAnother()" type="reset" data-ng-disabled="editForm.$invalid">Add Another</button>
+ <!--<button class="tlv-btn blue add-property-add-another" data-ng-if="isNew" data-ng-click="saveAndAnother()" type="reset" data-ng-disabled="editForm.$invalid">Add Another</button>-->
</div>
-</sdc-modal>
+</ng1-modal>
diff --git a/catalog-ui/src/app/view-models/modals/conformance-level-modal/conformance-level-modal-view.html b/catalog-ui/src/app/view-models/modals/conformance-level-modal/conformance-level-modal-view.html
index 3577e4d77b..59a13bc72a 100644
--- a/catalog-ui/src/app/view-models/modals/conformance-level-modal/conformance-level-modal-view.html
+++ b/catalog-ui/src/app/view-models/modals/conformance-level-modal/conformance-level-modal-view.html
@@ -1,4 +1,4 @@
-<sdc-modal modal="modalInstance"
+<ng1-modal modal="modalInstance"
type="classic"
class="w-sdc-modal modal-type-alert conformance-level-modal"
header="Warning"
@@ -19,4 +19,4 @@
</div>
</perfect-scrollbar>
-</sdc-modal>
+</ng1-modal>
diff --git a/catalog-ui/src/app/view-models/modals/email-modal/email-modal-view.html b/catalog-ui/src/app/view-models/modals/email-modal/email-modal-view.html
index bf65428033..0354e62063 100644
--- a/catalog-ui/src/app/view-models/modals/email-modal/email-modal-view.html
+++ b/catalog-ui/src/app/view-models/modals/email-modal/email-modal-view.html
@@ -1,4 +1,4 @@
-<sdc-modal modal="modalInstanceEmail" type="classic" class="w-sdc-modal-email modal-type-standard" header="{{emailModalModel.title}}" show-close-button="true">
+<ng1-modal modal="modalInstanceEmail" type="classic" class="w-sdc-modal-email modal-type-standard" header="{{emailModalModel.title}}" show-close-button="true">
<loader data-display="isLoading"></loader>
<form novalidate class="w-sdc-form" name="editForm">
@@ -74,4 +74,4 @@
<button class="tlv-btn blue" data-tests-id="OK" data-ng-click="submit()" data-ng-disabled="editForm.$invalid">OK</button>
<button class="tlv-btn grey" data-tests-id="Cancel" data-ng-click="cancel()" >Cancel</button>
</div>
-</sdc-modal>
+</ng1-modal>
diff --git a/catalog-ui/src/app/view-models/modals/error-modal/error-403-view.html b/catalog-ui/src/app/view-models/modals/error-modal/error-403-view.html
index 41b1c6df1d..08f3ef4952 100644
--- a/catalog-ui/src/app/view-models/modals/error-modal/error-403-view.html
+++ b/catalog-ui/src/app/view-models/modals/error-modal/error-403-view.html
@@ -1,4 +1,4 @@
<div class="sdc-error-403-container" >
<div class="sdc-error-403-container-title" translate="GENERAL_ERROR_403_TITLE"></div>
- <div class="w-sdc-error-403-text w-sdc-form" translate="GENERAL_ERROR_403_DESCRIPTION" translate-values="{{ mailtoJson }}"></div>
+ <div class="w-sdc-error-403-text w-sdc-form" translate="GENERAL_ERROR_403_DESCRIPTION" translate-values="{'mailto': mailto }"></div>
</div>
diff --git a/catalog-ui/src/app/view-models/modals/error-modal/error.less b/catalog-ui/src/app/view-models/modals/error-modal/error.less
index 8297b5053d..1843ea34bc 100644
--- a/catalog-ui/src/app/view-models/modals/error-modal/error.less
+++ b/catalog-ui/src/app/view-models/modals/error-modal/error.less
@@ -1,10 +1,17 @@
.sdc-error-403-container {
.bg_n;
width: 700px;
- height: 400px;
margin: auto;
margin-top: 196px;
+ padding: 40px;
+ box-shadow: #999 2px 2px 10px;
+ text-align: center;
+ .sdc-error-403-container-title {
+ font-size: 24px;
+ text-transform: uppercase;
+ }
+
.w-sdc-error-403-text {
.q_11;
margin-top: 20px;
diff --git a/catalog-ui/src/app/view-models/modals/icons-modal/icons-modal-view.html b/catalog-ui/src/app/view-models/modals/icons-modal/icons-modal-view.html
index 4b89701201..aa9230f9d9 100644
--- a/catalog-ui/src/app/view-models/modals/icons-modal/icons-modal-view.html
+++ b/catalog-ui/src/app/view-models/modals/icons-modal/icons-modal-view.html
@@ -1,4 +1,4 @@
-<sdc-modal modal="modalIcons" type="classic" class="w-sdc-modal-icons" buttons="footerButtons" header="Choose Icon" show-close-button="true">
+<ng1-modal modal="modalIcons" type="classic" class="w-sdc-modal-icons" buttons="footerButtons" header="Choose Icon" show-close-button="true">
<div class="suggested-icons-container">
<div class ="suggested-icon-wrapper" data-ng-class="{'selected': selectedIcon == iconSrc}" data-ng-repeat="iconSrc in icons track by $index">
@@ -15,4 +15,4 @@
<button class="tlv-btn blue" data-tests-id="OK" data-ng-click="updateIcon()">OK</button>
<button class="tlv-btn grey" data-tests-id="Cancel" data-ng-click="cancel()" >Cancel</button>
</div>
-</sdc-modal>
+</ng1-modal>
diff --git a/catalog-ui/src/app/view-models/modals/message-modal/message-client-modal/client-message-modal-view.html b/catalog-ui/src/app/view-models/modals/message-modal/message-client-modal/client-message-modal-view.html
index cfb0a35f69..421391e923 100644
--- a/catalog-ui/src/app/view-models/modals/message-modal/message-client-modal/client-message-modal-view.html
+++ b/catalog-ui/src/app/view-models/modals/message-modal/message-client-modal/client-message-modal-view.html
@@ -1,4 +1,4 @@
-<sdc-modal modal="modalInstanceError"
+<ng1-modal modal="modalInstanceError"
type="classic"
class="w-sdc-modal modal-type-alert"
header="{{messageModalModel.title}}"
@@ -13,4 +13,4 @@
<!--<div class="w-sdc-modal-body-content" data-ng-bind-html="messageModalModel.message"></div>-->
</perfect-scrollbar>
-</sdc-modal>
+</ng1-modal>
diff --git a/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts b/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts
index e3c6ad1c55..b92069fce2 100644
--- a/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts
+++ b/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts
@@ -24,6 +24,8 @@ import {IMessageModalModel, IMessageModalViewModelScope, MessageModalViewModel}
export interface IServerMessageModalModel extends IMessageModalModel {
status:string;
messageId:string;
+
+
}
export interface IServerMessageModalViewModelScope extends IMessageModalViewModelScope {
diff --git a/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html b/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html
index 294dc76c4c..524551bcc8 100644
--- a/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html
+++ b/catalog-ui/src/app/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html
@@ -1,4 +1,4 @@
-<sdc-modal modal="modalInstanceError"
+<ng1-modal modal="modalInstanceError"
type="classic"
class="w-sdc-modal modal-type-error"
header="{{messageModalModel.title}}"
@@ -14,4 +14,4 @@
<div class="w-sdc-modal-body-content" data-ng-bind-html="messageModalModel.message" data-tests-id="message"></div>
</perfect-scrollbar>
-</sdc-modal>
+</ng1-modal>
diff --git a/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view-model.ts b/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view-model.ts
index 1cc3690e9f..46b258f0bd 100644
--- a/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view-model.ts
+++ b/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view-model.ts
@@ -19,7 +19,7 @@
*/
'use strict';
-import {ComponentType, CHANGE_COMPONENT_CSAR_VERSION_FLAG, SEVERITY, FileUtils, ModalsHandler, ComponentFactory} from "app/utils";
+import {ComponentType, SEVERITY, FileUtils, ModalsHandler, ComponentFactory} from "app/utils";
import {OnboardingService, CacheService} from "app/services";
import {Component, IComponent, IUser, IAppConfigurtaion, Resource} from "app/models";
import {IServerMessageModalModel} from "../message-modal/message-server-modal/server-message-modal-view-model";
@@ -63,6 +63,7 @@ export class OnboardingModalViewModel {
'Sdc.Services.OnboardingService',
'okButtonText',
'currentCsarUUID',
+ 'currentCsarVersion',
'Sdc.Services.CacheService',
'FileUtils',
'ComponentFactory',
@@ -77,6 +78,7 @@ export class OnboardingModalViewModel {
private onBoardingService:OnboardingService,
private okButtonText:string,
private currentCsarUUID:string,
+ private currentCsarVersion:string,
private cacheService:CacheService,
private fileUtils:FileUtils,
private componentFactory:ComponentFactory,
@@ -107,28 +109,27 @@ export class OnboardingModalViewModel {
// Dismiss the modal and pass the "mini" component to workspace general page
this.$scope.doImportCsar = ():void => {
- this.$uibModalInstance.dismiss();
- this.$state.go('workspace.general', {
- type: ComponentType.RESOURCE.toLowerCase(),
- componentCsar: this.$scope.selectedComponent
+
+ this.$uibModalInstance.close({
+ componentCsar: this.$scope.selectedComponent,
+ type: ComponentType.RESOURCE.toLowerCase()
});
};
this.$scope.doUpdateCsar = ():void => {
- // In case user select on update the checkin and submit for testing buttons (in general page) should be disabled.
- // to do that we need to pass to workspace.general state parameter to know to disable the buttons.
- this.$uibModalInstance.close();
+
// Change the component version to the CSAR version we want to update.
- /*(<Resource>this.$scope.componentFromServer).csarVersion = (<Resource>this.$scope.selectedComponent).csarVersion;
- let component:Components.Component = this.componentFactory.createComponent(this.$scope.componentFromServer);
- this.$state.go('workspace.general', {vspComponent: component, disableButtons: true });*/
- this.cacheService.set(CHANGE_COMPONENT_CSAR_VERSION_FLAG, (<Resource>this.$scope.selectedComponent).csarVersion);
- this.$state.go('workspace.general', {
- id: this.$scope.componentFromServer.uniqueId,
- componentCsar: this.$scope.selectedComponent,
- type: this.$scope.componentFromServer.componentType.toLowerCase(),
- disableButtons: true
- });
+ if(!this.currentCsarVersion || this.currentCsarVersion != (<Resource>this.$scope.selectedComponent).csarVersion) {
+ this.$uibModalInstance.close({
+ componentCsar: this.$scope.selectedComponent,
+ previousComponent: this.$scope.componentFromServer,
+ type: this.$scope.componentFromServer.componentType.toLowerCase()
+
+ });
+
+ } else {
+ this.$uibModalInstance.close();
+ }
};
this.$scope.downloadCsar = (packageId:string):void => {
diff --git a/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view.html b/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view.html
index b078a4b1ef..a69d0a8f3c 100644
--- a/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view.html
+++ b/catalog-ui/src/app/view-models/modals/onboarding-modal/onboarding-modal-view.html
@@ -1,4 +1,4 @@
-<sdc-modal modal="modalOnboarding" class="w-sdc-modal-onboarding w-sdc-classic-top-line-modal" buttons="footerButtons" header="Import VF" show-close-button="true">
+<ng1-modal modal="modalOnboarding" class="w-sdc-modal-onboarding w-sdc-classic-top-line-modal" buttons="footerButtons" header="Import VF" show-close-button="true">
<info-tooltip class="general-info-button" info-message-translate="ON_BOARDING_GENERAL_INFO "></info-tooltip>
<div class="title-wrapper">
<div>
@@ -141,4 +141,4 @@
</div><!-- End table-container-flex -->
<div class="w-sdc-modal-footer classic"></div>
-</sdc-modal>
+</ng1-modal>