aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal')
-rw-r--r--catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts45
-rw-r--r--catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html17
-rw-r--r--catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal.less0
3 files changed, 62 insertions, 0 deletions
diff --git a/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts b/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts
new file mode 100644
index 0000000000..f7a0dcfabf
--- /dev/null
+++ b/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view-model.ts
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+/// <reference path="../../../../references"/>
+module Sdc.ViewModels {
+ 'use strict';
+
+ export interface IServerMessageModalModel extends IMessageModalModel {
+ status: string;
+ messageId: string;
+ }
+
+ export interface IServerMessageModalViewModelScope extends IMessageModalViewModelScope {
+ serverMessageModalModel: IServerMessageModalModel;
+ }
+
+ export class ServerMessageModalViewModel extends MessageModalViewModel {
+
+ static '$inject' = ['$scope', '$modalInstance', 'serverMessageModalModel'];
+
+ constructor(private $scope:IServerMessageModalViewModelScope,
+ private $modalInstance:ng.ui.bootstrap.IModalServiceInstance,
+ private serverMessageModalModel:IServerMessageModalModel) {
+
+ super($scope, $modalInstance, serverMessageModalModel);
+ }
+
+ }
+}
diff --git a/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html b/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html
new file mode 100644
index 0000000000..294dc76c4c
--- /dev/null
+++ b/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal-view.html
@@ -0,0 +1,17 @@
+<sdc-modal modal="modalInstanceError"
+ type="classic"
+ class="w-sdc-modal modal-type-error"
+ header="{{messageModalModel.title}}"
+ buttons="footerButtons"
+ show-close-button="true">
+
+ <perfect-scrollbar include-padding="true">
+ <div class="w-sdc-modal-icon w-sdc-modal-icon-{{messageModalModel.severity}}"></div>
+ <div class="w-sdc-modal-caption">
+ <div>Error code: {{messageModalModel.messageId}}</div>
+ <div>Status code: {{messageModalModel.status}}</div>
+ </div>
+ <div class="w-sdc-modal-body-content" data-ng-bind-html="messageModalModel.message" data-tests-id="message"></div>
+ </perfect-scrollbar>
+
+</sdc-modal>
diff --git a/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal.less b/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal.less
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/catalog-ui/app/scripts/view-models/modals/message-modal/message-server-modal/server-message-modal.less