Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blitz - Add cf events page to cf, org and space levels #4066

Merged
merged 21 commits into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix new failing unit test
  • Loading branch information
richard-cox committed Dec 17, 2019
commit 4cc959fe945a85883d9af6570b7cf7aa9866dcc9
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core';
import { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';

@Component({
selector: 'app-code-block',
templateUrl: './code-block.component.html',
styleUrls: ['./code-block.component.scss']
})
export class CodeBlockComponent implements AfterViewInit, OnDestroy {

export class CodeBlockComponent implements OnInit, OnDestroy {

@Input() hideCopy: boolean;
@Input() codeBlockStyle: string;
text: string;
text = '';
private observer: MutationObserver;

@ViewChild('preBlock', { static: true }) code: ElementRef;

ngAfterViewInit() {
this.text = this.code.nativeElement.innerText.trim();

ngOnInit(): void {
this.observer = new MutationObserver(() => {
this.text = this.code.nativeElement.innerText.trim();
});
const config: MutationObserverInit = {
// attributeFilter: string[];
attributeOldValue: true,
attributes: true,
characterData: true,
characterDataOldValue: true,
childList: true,
subtree: true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class CopyToClipboardComponent implements OnInit {

@Input() tooltip: string;
@Input() showSuccessText = true;
@Input() text: string;
@Input() text = '';

constructor(
@Inject(DOCUMENT) document: Document,
Expand Down