-
Notifications
You must be signed in to change notification settings - Fork 273
N°6759 factorize config #738
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| } | ||
|
|
||
| public function AddEditor(string $sPrevConfig, string $sNewConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont understand why there is 2 parameters, the only usage pass the same string (line 105)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, better code architecture. still comments.
I think we can also avoid using jquery in js file (we have a mix of jquery vanilla JS)
| $oAlert = GetAlertFromException($e); | ||
| $oP->AddUiBlock($oAlert); | ||
| } | ||
| $oLogCenterController = new ConfigEditorController(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong var name oLogCenterController (copy past 🧐)
| @@ -0,0 +1,172 @@ | |||
| <?php | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright
datamodels/2.x/itop-config/src/Controller/ConfigEditorController.php
Outdated
Show resolved
Hide resolved
datamodels/2.x/itop-config/src/Controller/ConfigEditorController.php
Outdated
Show resolved
Hide resolved
| 'sTransactionId' => utils::GetNewTransactionId(), | ||
| 'sChecksum' => $sConfigChecksum, | ||
| 'sPrevConfig' => $sCurrentConfig, | ||
| 'sNewConfig' => $sCurrentConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 identical parameters, really needed ?
datamodels/2.x/itop-config/src/Validator/iTopConfigValidator.php
Outdated
Show resolved
Hide resolved
| document.getElementById('ibo-main-content').addEventListener('click',repositionEditor); | ||
|
|
||
| document.getElementById('cancel_button').onclick = ()=>{ | ||
| $("#operation").attr('value', 'revert'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer vanilla js
No description provided.