|
|
@ -815,16 +815,14 @@ command_result Core::runCommand(color_ostream &con, const std::string &first_, v
|
|
|
|
const char *row_format = "%25s %10s %4i\n";
|
|
|
|
const char *row_format = "%25s %10s %4i\n";
|
|
|
|
con.print(header_format, "Name", "State", "Cmds");
|
|
|
|
con.print(header_format, "Name", "State", "Cmds");
|
|
|
|
|
|
|
|
|
|
|
|
vector<string> plugins;
|
|
|
|
plug_mgr->refresh();
|
|
|
|
if (parts.size())
|
|
|
|
for (auto it = plug_mgr->begin(); it != plug_mgr->end(); ++it)
|
|
|
|
plugins = parts;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
plugins = plug_mgr->listPlugins();
|
|
|
|
|
|
|
|
for (auto f = plugins.begin(); f != plugins.end(); ++f)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const Plugin * plug = plug_mgr->getPluginByName(*f);
|
|
|
|
const Plugin * plug = it->second;
|
|
|
|
if (!plug)
|
|
|
|
if (!plug)
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (parts.size() && std::find(parts.begin(), parts.end(), plug->getName()) == parts.end())
|
|
|
|
|
|
|
|
continue;
|
|
|
|
color_value color;
|
|
|
|
color_value color;
|
|
|
|
switch (plug->getState())
|
|
|
|
switch (plug->getState())
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -847,7 +845,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first_, v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
con.color(color);
|
|
|
|
con.color(color);
|
|
|
|
con.print(row_format,
|
|
|
|
con.print(row_format,
|
|
|
|
f->c_str(),
|
|
|
|
plug->getName().c_str(),
|
|
|
|
Plugin::getStateDescription(plug->getState()),
|
|
|
|
Plugin::getStateDescription(plug->getState()),
|
|
|
|
plug->size()
|
|
|
|
plug->size()
|
|
|
|
);
|
|
|
|
);
|
|
|
|