-
Notifications
You must be signed in to change notification settings - Fork 198
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
[Editor] Providing front end design for Streaming Integrator extension-installation features #1781
Conversation
, | ||
} | ||
}, | ||
{name: "kafka", status: "not-installed"}, |
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.
is this json has the latest format ? @senthuran16 please check
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.
no its not a latest format i will change this json data as @senthuran16 shared json data.
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.
88cbc98 this commit will fix this change request
/** | ||
* functions to get the not installed extension array details. | ||
*/ | ||
var getNotInstalledExtensionDetails = function () { |
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.
change to getUninstalledExtensionDetails
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.
88cbc98 this commit will fix this change request
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.
@dnwick Shall we say getNonInstalledExtensionDetails
? 'Uninstalled' might give the wrong idea as "Installed, and removed later"
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.
since @dnwick asked me to change that as getUninstalledExtensionDetails
,I have changed as that.If he ok with this i will be ok
if (isNotInstalledExtension(operatorExtension)) { | ||
keyResult.push({ | ||
extension: getNotInstalledExtensionObject(operatorExtension), | ||
status: "Not-Installed", |
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.
use constants please
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.
88cbc98 this commit will fix this change request
@@ -309,11 +309,11 @@ define(['jquery', 'lodash', 'log','remarkable', 'handlebar', 'designViewUtils',' | |||
/** | |||
* functions to get the not installed extension array details. | |||
*/ | |||
var getNotInstalledExtensionDetails = function () { | |||
var getUninstalledExtensionDetails = function () { |
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.
@dnwick & @SinthujanSintha Shall we say getNonInstalledExtensionDetails
? 'Uninstalled' might give the wrong idea as "Installed, and removed later"
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.
+1
...ddhi.editor.core/src/main/resources/web/editor/commons/js/dialog/extension-install-dialog.js
Outdated
Show resolved
Hide resolved
if (extension.manuallyInstall) { | ||
extensionTableBodyData = $('<tr><td>' + extension.extensionInfo.name + '</td><td>Not-Installed' + | ||
extensionsRendering(); | ||
var callbackUpdateForExtensionFileBrowser = function (updatedExtension, isUpdated) { |
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.
what is isUpdated means ? do u need to it
createAlertModalBoxForNotAndPartialExtension(extension, key, extensionTableBodyData); | ||
} else { | ||
extensionTableBodyData.find("button").click(function () { |
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.
you can take this code out whithout duplicating in each case
"lookupRegex": "grpc-server-(.+).jar" | ||
} | ||
] | ||
}, |
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.
@senthuran16 please check whether json config is correct
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.
Yes, this json config is correct.
alert(updateData.name + " " + updateData.action); | ||
//this updatedExtension data should come from backend. | ||
var updatedExtension = { | ||
// "extensionStatus": "PARTIALLY_INSTALLED", |
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.
remove comments
@@ -309,11 +309,11 @@ define(['jquery', 'lodash', 'log','remarkable', 'handlebar', 'designViewUtils',' | |||
/** | |||
* functions to get the not installed extension array details. | |||
*/ | |||
var getNotInstalledExtensionDetails = function () { | |||
var getUninstalledExtensionDetails = function () { |
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.
+1
var isPartialInstalledExtension = function (operatorExtension) { | ||
var partiallyInstalledExtensionArray = getPartiallyInstalledExtensionDetails(); | ||
for (var extension of partiallyInstalledExtensionArray) { | ||
if (((operatorExtension.name.trim().toLowerCase()).indexOf(extension.extensionInfo.name.trim().toLowerCase())) > -1) return true; |
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.
do not use if clauses without pranthesis even though u can write it in one line. its hard to read the code
@@ -368,14 +435,34 @@ define(['jquery', 'lodash', 'log','remarkable', 'handlebar', 'designViewUtils',' | |||
if (isNotInstalledExtension(operatorExtension)) { |
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.
For each operator in order to check whether its uninstalled extension aren't you creating the same array again again in the getUninstalledExtensionDetails method ? I think that is same for isPartialInstalledExtension , isInstalledExtension functions. Create the the arrays one time and use else this will be a huge process
}; | ||
var extensionTable; | ||
|
||
function renderExtensions() { |
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.
can you move this funtion to higher level like this.render = function () {
Purpose
Goals
Approach
Security checks
Samples
Test environment