feat(ui): display Runners in menu only if runners enabled

This commit is contained in:
Denis Gukov 2024-09-29 20:29:55 +05:00
parent 55cc129238
commit 0bd8c874fb
2 changed files with 9 additions and 4 deletions

View File

@ -458,9 +458,10 @@ func serveFile(w http.ResponseWriter, r *http.Request, name string) {
func getSystemInfo(w http.ResponseWriter, r *http.Request) {
body := map[string]interface{}{
"version": util.Version(),
"ansible": util.AnsibleVersion(),
"web_host": util.WebHostURL.String(),
"version": util.Version(),
"ansible": util.AnsibleVersion(),
"web_host": util.WebHostURL.String(),
"use_remote_runner": util.Config.UseRemoteRunner,
}
helpers.WriteJSON(w, http.StatusOK, body)

View File

@ -404,7 +404,11 @@
</v-list-item-content>
</v-list-item>
<v-list-item key="runners" to="/runners" v-if="user.admin">
<v-list-item
key="runners"
to="/runners"
v-if="user.admin && systemInfo.use_remote_runner"
>
<v-list-item-icon>
<v-icon>mdi-cogs</v-icon>
</v-list-item-icon>