mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 23:05:26 +02:00
feat(log-viewer): introduce the log viewer component (#1666)
This commit is contained in:
parent
81de2a5afb
commit
0c5152fb5f
36 changed files with 458 additions and 304 deletions
|
@ -6,14 +6,12 @@ function ($document, CodeMirrorService) {
|
|||
this.$onInit = function() {
|
||||
$document.ready(function() {
|
||||
var editorElement = $document[0].getElementById(ctrl.identifier);
|
||||
if (editorElement) {
|
||||
ctrl.editor = CodeMirrorService.applyCodeMirrorOnElement(editorElement, ctrl.yml, ctrl.readOnly);
|
||||
if (ctrl.onChange) {
|
||||
ctrl.editor.on('change', ctrl.onChange);
|
||||
}
|
||||
if (ctrl.value) {
|
||||
ctrl.editor.setValue(ctrl.value);
|
||||
}
|
||||
ctrl.editor = CodeMirrorService.applyCodeMirrorOnElement(editorElement, ctrl.yml, ctrl.readOnly);
|
||||
if (ctrl.onChange) {
|
||||
ctrl.editor.on('change', ctrl.onChange);
|
||||
}
|
||||
if (ctrl.value) {
|
||||
ctrl.editor.setValue(ctrl.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue