You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/09/13 08:21:08 UTC

[incubator-dlab] 05/06: moved servise pages; separate service page module

This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a commit to branch DLAB-1056
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit cb1a557d14b1d5759ccc2e71532272b154a83a2e
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Sep 13 11:20:29 2019 +0300

    moved servise pages; separate service page module
---
 .../access-denied/access-denied.component.scss     | 52 +++++++++++++++++++
 .../access-denied/access-denied.component.ts       | 44 ++++++++++++++++
 .../not-found/not-found.component.html             | 33 ++++++++++++
 .../not-found/not-found.component.scss             | 59 ++++++++++++++++++++++
 .../service-pages/not-found/not-found.component.ts | 27 ++++++++++
 .../src/app/service-pages/service-pages.module.ts  | 30 +++++++++++
 6 files changed, 245 insertions(+)

diff --git a/services/self-service/src/main/resources/webapp/src/app/service-pages/access-denied/access-denied.component.scss b/services/self-service/src/main/resources/webapp/src/app/service-pages/access-denied/access-denied.component.scss
new file mode 100644
index 0000000..eb3eac2
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/service-pages/access-denied/access-denied.component.scss
@@ -0,0 +1,52 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+.no-access-page {
+  height: 100%;
+  background: #f5f5f5;
+  color: #8c8888;
+  .content {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    max-width: 560px;
+    max-height: 360px;
+    margin: auto;
+  }
+  .logo {
+    display: block;
+    img {
+      width: 100%;
+    }
+  }
+  .message-block {
+    width: 300px;
+    margin: 0 auto;
+    text-align: center;
+    a {
+      text-decoration: none;
+      color: #36afd5;
+      transition: all .35s ease-in-out;
+      &:hover, &:active {
+        color: #3392b0;
+      }
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/service-pages/access-denied/access-denied.component.ts b/services/self-service/src/main/resources/webapp/src/app/service-pages/access-denied/access-denied.component.ts
new file mode 100644
index 0000000..5be53fd
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/service-pages/access-denied/access-denied.component.ts
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'dlab-access-denied',
+  template: `
+    <div class="no-access-page">
+      <div class="content">
+        <a class="logo" href="#/resources_list">
+          <img src="assets/img/security-screen.png" alt="">
+        </a>
+
+        <div class="message-block">
+          <h3>Access Denied!</h3>
+          <p>The page you were trying to reach has restricted access.
+            <a href="#/resources_list">Go to the Homepage?</a>
+          </p>
+        </div>
+      </div>
+    </div>
+  `,
+  styleUrls: ['./access-denied.component.scss']
+})
+export class AccessDeniedComponent implements OnInit {
+  constructor() { }
+  ngOnInit() { }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.html b/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.html
new file mode 100644
index 0000000..2eb5e74
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.html
@@ -0,0 +1,33 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  -->
+
+<div class="not-found-page">
+  <div class="content">
+    <a class="logo" href="#/resources_list">
+      <img src="assets/svg/not_found_page.svg" alt="">
+    </a>
+
+    <div class="message-block">
+      <h3>Whooops... Page Not Found!</h3>
+      <p>We couldn't seem to found the page you are looking for.
+        <a href="#/resources_list">Go to the Homepage?</a>
+      </p>
+    </div>
+  </div>
+</div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.scss b/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.scss
new file mode 100644
index 0000000..40c98e1
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.scss
@@ -0,0 +1,59 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+.not-found-page {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: #f5f5f5;
+  color: #8c8888;
+  z-index: -1;
+  .content {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    max-width: 560px;
+    max-height: 360px;
+    margin: auto;
+  }
+  .logo {
+    display: block;
+    img {
+      width: 100%;
+    }
+  }
+  .message-block {
+    position: absolute;
+    bottom: -20px;
+    width: 300px;
+    font-size: 14px;
+    a {
+      text-decoration: none;
+      color: #36afd5;
+      transition: all .35s ease-in-out;
+      &:hover, &:active {
+        color: #3392b0;
+      }
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.ts b/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.ts
new file mode 100644
index 0000000..34f860f
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/service-pages/not-found/not-found.component.ts
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import { Component } from '@angular/core';
+
+@Component({
+    selector: 'not-found',
+    templateUrl: 'not-found.component.html',
+    styleUrls: ['not-found.component.scss']
+})
+export class NotFoundComponent { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/service-pages/service-pages.module.ts b/services/self-service/src/main/resources/webapp/src/app/service-pages/service-pages.module.ts
new file mode 100644
index 0000000..f3da2fe
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/service-pages/service-pages.module.ts
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { NotFoundComponent } from './not-found/not-found.component';
+import { AccessDeniedComponent } from './access-denied/access-denied.component';
+
+@NgModule({
+  imports: [CommonModule],
+  declarations: [NotFoundComponent, AccessDeniedComponent],
+  exports: [NotFoundComponent, AccessDeniedComponent]
+})
+export class ServicePagesModule { }
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org