mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-24 14:54:43 +08:00
feat: 1pctl user-info 返回增加 protocol 信息 (#781)
This commit is contained in:
parent
34e84081e3
commit
79622f324b
2 changed files with 9 additions and 2 deletions
|
@ -39,6 +39,7 @@ var userinfoCmd = &cobra.Command{
|
||||||
user := getSettingByKey(db, "UserName")
|
user := getSettingByKey(db, "UserName")
|
||||||
password := getSettingByKey(db, "Password")
|
password := getSettingByKey(db, "Password")
|
||||||
port := getSettingByKey(db, "ServerPort")
|
port := getSettingByKey(db, "ServerPort")
|
||||||
|
ssl := getSettingByKey(db, "SSL")
|
||||||
entrance := getSettingByKey(db, "SecurityEntrance")
|
entrance := getSettingByKey(db, "SecurityEntrance")
|
||||||
enptrySetting := getSettingByKey(db, "EncryptKey")
|
enptrySetting := getSettingByKey(db, "EncryptKey")
|
||||||
|
|
||||||
|
@ -50,10 +51,16 @@ var userinfoCmd = &cobra.Command{
|
||||||
p = password
|
p = password
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("entrance: %s\n", entrance)
|
protocol := "http"
|
||||||
|
if ssl == "enable" {
|
||||||
|
protocol = "https"
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Printf("username: %s\n", user)
|
fmt.Printf("username: %s\n", user)
|
||||||
fmt.Printf("password: %s\n", p)
|
fmt.Printf("password: %s\n", p)
|
||||||
fmt.Printf("port: %s\n", port)
|
fmt.Printf("port: %s\n", port)
|
||||||
|
fmt.Printf("protocol: %s\n", protocol)
|
||||||
|
fmt.Printf("entrance: %s\n", entrance)
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/Website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { loadSSLInfo } from '@/api/modules/setting';
|
import { loadSSLInfo } from '@/api/modules/setting';
|
||||||
import { dateFormatSimple, getProvider } from '@/utils/util';
|
import { dateFormatSimple, getProvider } from '@/utils/util';
|
||||||
import { ListSSL } from '@/api/modules/website';
|
import { ListSSL } from '@/api/modules/website';
|
||||||
|
|
Loading…
Reference in a new issue