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

Fixes #17134: Adapt technique editor to not call ncf api and add method to generate data for Rudder #1175

Conversation

VinceMacBuche
Copy link
Member

@VinceMacBuche VinceMacBuche requested a review from fanf April 20, 2020 23:07
@VinceMacBuche VinceMacBuche changed the base branch from master to branches/rudder/6.1 April 20, 2020 23:08
@VinceMacBuche
Copy link
Member Author

PR rebased

@VinceMacBuche VinceMacBuche force-pushed the ust_17134/adapt_technique_editor_to_not_call_ncf_api_and_add_method_to_generate_data_for_rudder branch 2 times, most recently from 6771300 to 9180250 Compare April 21, 2020 22:41
@VinceMacBuche
Copy link
Member Author

PR updated with a new commit

@VinceMacBuche VinceMacBuche force-pushed the ust_17134/adapt_technique_editor_to_not_call_ncf_api_and_add_method_to_generate_data_for_rudder branch from a22f26b to 46a8868 Compare April 22, 2020 21:29
@VinceMacBuche
Copy link
Member Author

PR rebased

@@ -1115,8 +1129,12 @@ $scope.onImportFileChange = function (fileEl) {
if (method_call.method_name in $scope.generic_methods ) {
var method = $scope.generic_methods[method_call.method_name];
var class_parameter = method.class_parameter;
var param_index = method.bundle_args.indexOf(class_parameter);
return method_call.parameters[param_index];
console.log(method)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@VinceMacBuche
Copy link
Member Author

PR updated with a new commit

@@ -449,7 +450,7 @@ function toTechUI (technique) {

// Handle class_context
defineMethodClassContext(method_call)
method_call.parameters=$scope.getMethodParameters(method_call)
//method_call.parameters=$scope.getMethodParameters(method_call)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refresh the page :)

@VinceMacBuche
Copy link
Member Author

PR updated with a new commit

ncf Outdated
@@ -64,8 +88,15 @@ if __name__ == '__main__':
usage()
exit(1)

pprint(sys.argv[1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug

@VinceMacBuche
Copy link
Member Author

PR updated with a new commit

ncf
category = technique["category"] if len(technique["category"]) > 0 else "ncf_techniques"
version = technique["version"] if len(technique["version"]) > 0 else "1.0"
techniqueFile = '/var/rudder/configuration-repository/techniques/'+category+"/"+ bundle_name +"/"+version+'/technique.json'
if not os.path.exists(techniqueFile):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will update this file when it exists?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's already written then it will be managed by Rudder (in fact the goal here is to bootstrap the technique.json file so that Rudder will enrich them)

@VinceMacBuche
Copy link
Member Author

PR updated with a new commit

@Normation-Quality-Assistant
Copy link
Contributor

OK, squash merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant force-pushed the ust_17134/adapt_technique_editor_to_not_call_ncf_api_and_add_method_to_generate_data_for_rudder branch from db36454 to ecacbde Compare April 22, 2020 22:24
@Normation-Quality-Assistant Normation-Quality-Assistant merged commit ecacbde into Normation:branches/rudder/6.1 Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants