mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
* #4007 feat(yaml-inspector): add button to expand/collapse yaml inspector * feat(yaml-inspector): add button to expand/collapse yaml inspector Better yamlInspector.html formatting * feat(yaml-inspector): change name of toggle function More descriptive name for the function that toggles the expansion of the YAML inspector.
This commit is contained in:
parent
86ad1c6af1
commit
d84a5b9c67
2 changed files with 10 additions and 0 deletions
|
@ -5,12 +5,20 @@ class KubernetesYamlInspectorController {
|
|||
|
||||
constructor(clipboard) {
|
||||
this.clipboard = clipboard;
|
||||
this.expanded = false;
|
||||
}
|
||||
|
||||
copyYAML() {
|
||||
this.clipboard.copyText(this.data);
|
||||
$('#copyNotificationYAML').show().fadeOut(2500);
|
||||
}
|
||||
|
||||
toggleYAMLInspectorExpansion() {
|
||||
let selector = 'kubernetes-yaml-inspector code-editor > div.CodeMirror';
|
||||
let height = this.expanded ? '500px' : '80vh';
|
||||
$(selector).css({ height: height });
|
||||
this.expanded = !this.expanded;
|
||||
}
|
||||
}
|
||||
|
||||
export default KubernetesYamlInspectorController;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue