added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / app / not-found / not-found.component.ts
diff --git a/otf-frontend/client/src/app/not-found/not-found.component.ts b/otf-frontend/client/src/app/not-found/not-found.component.ts
new file mode 100644 (file)
index 0000000..1aa6b9e
--- /dev/null
@@ -0,0 +1,69 @@
+/*  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+##############################################################################*/\r
+\r
+\r
+import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';\r
+import * as $ from 'jquery';\r
+\r
+@Component({\r
+  selector: 'app-not-found',\r
+  templateUrl: './not-found.component.html',\r
+  styleUrls: ['./not-found.component.scss']\r
+})\r
+export class NotFoundComponent implements OnInit {\r
+\r
+  constructor() { }\r
+\r
+  ngOnInit() {\r
+    var loop1, loop2, loop3, time = 30, i = 0, number, selector3 = $('.thirdDigit'), selector2 = $('.secondDigit'),\r
+      selector1 = $('.firstDigit');\r
+    loop3 = setInterval(() => {\r
+      "use strict";\r
+      if (i > 40) {\r
+        clearInterval(loop3);\r
+        selector3.text(4);\r
+      } else {\r
+        selector3.text(this.randomNum());\r
+        i++;\r
+      }\r
+    }, time);\r
+    loop2 = setInterval(() => {\r
+      "use strict";\r
+      if (i > 80) {\r
+        clearInterval(loop2);\r
+        selector2.text(0);\r
+      } else {\r
+        selector2.text(this.randomNum());\r
+        i++;\r
+      }\r
+    }, time);\r
+    loop1 = setInterval( () => {\r
+      "use strict";\r
+      if (i > 100) {\r
+        clearInterval(loop1);\r
+        selector1.text(4);\r
+      } else {\r
+        selector1.text(this.randomNum());\r
+        i++;\r
+      }\r
+    }, time);\r
+  }\r
+\r
+  randomNum() {\r
+    "use strict";\r
+    return Math.floor(Math.random() * 9) + 1;\r
+  }\r
+\r
+}\r