This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/sivel/speedtest-cli | |
| import speedtest as st | |
| import pandas as pd | |
| from datetime import datetime | |
| def get_new_speeds(): | |
| speed_test = st.Speedtest() | |
| speed_test.get_best_server() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { MockServ1Service } from './mock-serv-1.service'; | |
| import { MockServ2Service } from './mock-serv-2.service'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class ModalActionsService { | |
| constructor( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class MockServ2Service { | |
| constructor() { } | |
| alertDelete(modalData: any) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class MockServ1Service { | |
| constructor() { } | |
| alertLogout(modalData: any) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Inject } from '@angular/core'; | |
| import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; | |
| import { ModalActionsService } from 'src/app/services/modal-actions.service'; | |
| @Component({ | |
| selector: 'app-modal', | |
| templateUrl: './modal.component.html', | |
| styleUrls: ['./modal.component.css'] | |
| }) | |
| export class ModalComponent implements OnInit { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class ModalActionsService { | |
| constructor() { } | |
| modalAction(modalData: any) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="modal-content-wrapper"> | |
| <header id="modal-header"> | |
| <h1 id="modal-title">{{ modalData.title }}</h1> | |
| </header> | |
| <section id="modal-body"> | |
| <p>{{ modalData.description }}</p> | |
| </section> | |
| <footer id="modal-footer"> | |
| <button mat-raised-button id="modal-action-button" (click)="actionFunction()"> | |
| {{ modalData.actionButtonText }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Inject } from '@angular/core'; | |
| import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; | |
| @Component({ | |
| selector: 'app-modal', | |
| templateUrl: './modal.component.html', | |
| styleUrls: ['./modal.component.css'] | |
| }) | |
| export class ModalComponent implements OnInit { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; | |
| import { ModalComponent } from './components/modal/modal.component'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <main id="logout-button-holder"> | |
| <button mat-raised-button id="logout-button" (click)="openLogoutModal()">Logout</button> | |
| <button mat-raised-button id="delete-product-button" (click)="openDeleteProductModal()">Delete Product</button> | |
| </main> |