Skip to content

Commit 2fced83

Browse files
authored
refactor(interactive): Order procedures by default based on creation time. (#4059)
Order procedures by default based on creation time.
1 parent 85cb032 commit 2fced83

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

flex/engines/http_server/workdir_manipulator.cc

+5-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ gs::Result<bool> WorkDirManipulator::DumpGraphSchema(
105105
YAML::Node plugin_node;
106106
plugin_node["name"] = plugin.name;
107107
plugin_node["library"] = plugin.library;
108-
plugin_node["description"] = plugin.description;
108+
// quote the description, since it may contain space.
109+
plugin_node["description"] = "\"" + plugin.description + "\"";
109110
if (plugin.params.size() > 0) {
110111
YAML::Node params_node;
111112
for (auto& param : plugin.params) {
@@ -525,7 +526,9 @@ gs::Result<seastar::sstring> WorkDirManipulator::UpdateProcedure(
525526
auto new_description = json["description"];
526527
VLOG(10) << "Update description: "
527528
<< new_description; // update description
528-
plugin_node["description"] = new_description.get<std::string>();
529+
// quote the description, since it may contain space.
530+
plugin_node["description"] =
531+
"\"" + new_description.get<std::string>() + "\"";
529532
}
530533

531534
bool enabled;

flex/storages/metadata/default_graph_meta_store.cc

+5
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ Result<std::vector<PluginMeta>> DefaultGraphMetaStore::GetAllPluginMeta(
150150
metas.push_back(plugin_meta);
151151
}
152152
}
153+
// Sort the plugin metas by create time.
154+
std::sort(metas.begin(), metas.end(),
155+
[](const PluginMeta& a, const PluginMeta& b) {
156+
return a.creation_time < b.creation_time;
157+
});
153158
return Result<std::vector<PluginMeta>>(metas);
154159
}
155160

0 commit comments

Comments
 (0)