lintel 0.2.0
Loading...
Searching...
No Matches
HistoryCliComponent.h
Go to the documentation of this file.
1#ifndef HISTORYCLICOMPONENT_H
2#define HISTORYCLICOMPONENT_H
3
7
8namespace lintel {
11{
12 static constexpr std::string_view n_name = "History";
13 static constexpr std::string_view m_alias = "Hist";
14 static constexpr std::string_view m_description = "The Component can be used to show the history of components";
15 std::shared_ptr<HistoryApi> m_historyApi;
16
17 // Commands
18 enum Commands { Undefined, ShowHistories };
19
20 // Flags
21 std::optional<std::string> m_processName;
22 std::optional<std::string> m_serviceName;
23 std::optional<std::string> m_label;
24
26
28 static void printHistories(const std::vector<HistoryDto> &histories);
29
30public:
32 explicit HistoryCliComponent(std::shared_ptr<HistoryApi> historyApi);
33
34 void onHelp() override;
35
36 void
37 onCommand(const UserDto &userDto, const std::string &command, const std::vector<std::string> &parameters) override;
38
39 void onShowMenu() override;
40
41 bool onMenu(const std::string &component) override;
42
43 bool onExit() override;
44
45 void printCommandList(std::set<std::string> menuAlias) override;
46
47 std::vector<std::string> allCommandsOf() override;
48};
49
50}// namespace lintel
51#endif// HISTORYCLICOMPONENT_H
Definition CommandLineComponent.h:17
Definition CommandParser.h:21
Definition HistoryCliComponent.h:11
bool onMenu(const std::string &component) override
void onCommand(const UserDto &userDto, const std::string &command, const std::vector< std::string > &parameters) override
void printCommandList(std::set< std::string > menuAlias) override
HistoryCliComponent(std::shared_ptr< HistoryApi > historyApi)
std::vector< std::string > allCommandsOf() override
void onShowMenu() override
Definition UserDto.h:16
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9