feat: version2 modify tip msg
This commit is contained in:
parent
1e7cfefc5e
commit
987e0b845f
|
@ -41,6 +41,9 @@ void callbackAutoTab(char* sqlstr, TAOS* pSql, bool usedb);
|
|||
// introduction
|
||||
void printfIntroduction();
|
||||
|
||||
// show enterprise AD at start or end
|
||||
void showAD(bool end);
|
||||
|
||||
// show all commands help
|
||||
void showHelp();
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ SMatch* lastMatch = NULL; // save last match result
|
|||
int cntDel = 0; // delete byte count after next press tab
|
||||
|
||||
// show auto tab introduction
|
||||
void printfIntroduction() {
|
||||
void printfIntroduction(bool community) {
|
||||
printf(" ******************************** Tab Completion ************************************\n");
|
||||
char secondLine[160] = "\0";
|
||||
sprintf(secondLine, " * The %s CLI supports tab completion for a variety of items, ", shell.info.cusName);
|
||||
|
@ -420,9 +420,24 @@ void printfIntroduction() {
|
|||
printf(" * [ Ctrl + L ] ...... clear the entire screen *\n");
|
||||
printf(" * [ Ctrl + K ] ...... clear the screen after the cursor *\n");
|
||||
printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n");
|
||||
if(community) {
|
||||
printf(" * ----------------------------------------------------------------------------- *\n");
|
||||
printf(" * You are using TDengine OSS. To experience more advanced TDengine features and *\n");
|
||||
printf(" * receive professional technical support, try TDengine Enterprise: *\n");
|
||||
printf(" * http://www.tdengine.com *\n");
|
||||
}
|
||||
printf(" **************************************************************************************\n\n");
|
||||
}
|
||||
|
||||
// show enterprise AD
|
||||
void showAD(bool end) {
|
||||
printf("\n");
|
||||
printf(" You are using TDengine OSS. To experience more advanced TDengine features and \n");
|
||||
printf(" receive professional technical support, try TDengine Enterprise: \n");
|
||||
printf(" http://www.tdengine.com \n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void showHelp() {
|
||||
printf("\nThe %s CLI supports the following commands:", shell.info.cusName);
|
||||
printf(
|
||||
|
|
|
@ -1150,15 +1150,6 @@ void shellSourceFile(const char *file) {
|
|||
taosCloseFile(&pFile);
|
||||
}
|
||||
|
||||
// show enterprise AD
|
||||
void showAD() {
|
||||
fprintf(stdout, "\r\n\
|
||||
You are using the TDengine Community Edition. \r\n\
|
||||
If you want to experience more advanced TDengine features and have professional service,\r\n\
|
||||
please try the TDengine Enterprise Edition.\r\n\
|
||||
https://www.taosdata.com/tdengine-enterprise\r\n\r\n");
|
||||
}
|
||||
|
||||
bool shellGetGrantInfo() {
|
||||
bool community = true;
|
||||
char sinfo[1024] = {0};
|
||||
|
@ -1205,7 +1196,6 @@ bool shellGetGrantInfo() {
|
|||
|
||||
if (strcmp(serverVersion, "community") == 0) {
|
||||
community = true;
|
||||
showAD();
|
||||
} else if (strcmp(expiretime, "unlimited") == 0) {
|
||||
community = false;
|
||||
fprintf(stdout, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo);
|
||||
|
@ -1377,11 +1367,16 @@ int32_t shellExecute() {
|
|||
|
||||
#ifdef WEBSOCKET
|
||||
if (!shell.args.restful && !shell.args.cloud) {
|
||||
#endif
|
||||
#ifndef WINDOWS
|
||||
printfIntroduction();
|
||||
#endif
|
||||
bool community = shellGetGrantInfo();
|
||||
#ifndef WINDOWS
|
||||
printfIntroduction(community);
|
||||
#else
|
||||
if(community) {
|
||||
showAD(false)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WEBSOCKET
|
||||
}
|
||||
#endif
|
||||
|
@ -1397,7 +1392,7 @@ int32_t shellExecute() {
|
|||
|
||||
// commnuity
|
||||
if (community) {
|
||||
showAD();
|
||||
showAD(true);
|
||||
}
|
||||
|
||||
taosThreadJoin(spid, NULL);
|
||||
|
|
Loading…
Reference in New Issue