X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=otf-frontend%2Fclient%2Fsrc%2Fapp%2Fnot-found%2Fnot-found.component.ts;fp=otf-frontend%2Fclient%2Fsrc%2Fapp%2Fnot-found%2Fnot-found.component.ts;h=1aa6b9ef91b5289809d38c2c0262daf7a44b3337;hb=14f6f95c84a4a1fa8774190db4a03fd0214ec55f;hp=0000000000000000000000000000000000000000;hpb=f49bd1efeaaddd4891c1f329b18d8cfb28b3e75b;p=it%2Fotf.git 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 index 0000000..1aa6b9e --- /dev/null +++ b/otf-frontend/client/src/app/not-found/not-found.component.ts @@ -0,0 +1,69 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +##############################################################################*/ + + +import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; +import * as $ from 'jquery'; + +@Component({ + selector: 'app-not-found', + templateUrl: './not-found.component.html', + styleUrls: ['./not-found.component.scss'] +}) +export class NotFoundComponent implements OnInit { + + constructor() { } + + ngOnInit() { + var loop1, loop2, loop3, time = 30, i = 0, number, selector3 = $('.thirdDigit'), selector2 = $('.secondDigit'), + selector1 = $('.firstDigit'); + loop3 = setInterval(() => { + "use strict"; + if (i > 40) { + clearInterval(loop3); + selector3.text(4); + } else { + selector3.text(this.randomNum()); + i++; + } + }, time); + loop2 = setInterval(() => { + "use strict"; + if (i > 80) { + clearInterval(loop2); + selector2.text(0); + } else { + selector2.text(this.randomNum()); + i++; + } + }, time); + loop1 = setInterval( () => { + "use strict"; + if (i > 100) { + clearInterval(loop1); + selector1.text(4); + } else { + selector1.text(this.randomNum()); + i++; + } + }, time); + } + + randomNum() { + "use strict"; + return Math.floor(Math.random() * 9) + 1; + } + +}