Instance metadata options in profile settings

main
Bob Mottram 2021-05-03 11:59:28 +01:00
parent 46accb7b40
commit 501885f5bb
18 changed files with 94 additions and 16 deletions

View File

@ -4703,6 +4703,24 @@ class PubServer(BaseHTTPRequestHandler):
# on all incoming posts
if path.startswith('/users/' +
adminNickname + '/'):
showNodeInfoAccounts = False
if fields.get('showNodeInfoAccounts'):
if fields['showNodeInfoAccounts'] == 'on':
showNodeInfoAccounts = True
self.server.showNodeInfoAccounts = \
showNodeInfoAccounts
setConfigParam(baseDir, "showNodeInfoAccounts",
showNodeInfoAccounts)
showNodeInfoVersion = False
if fields.get('showNodeInfoVersion'):
if fields['showNodeInfoVersion'] == 'on':
showNodeInfoVersion = True
self.server.showNodeInfoVersion = \
showNodeInfoVersion
setConfigParam(baseDir, "showNodeInfoVersion",
showNodeInfoVersion)
verifyAllSignatures = False
if fields.get('verifyallsignatures'):
if fields['verifyallsignatures'] == 'on':

View File

@ -437,5 +437,7 @@
"viewButton": "عرض زر",
"enterPetname": "أدخل PETNAME",
"enterNotes": "أدخل الملاحظات",
"These access keys may be used": "قد يتم استخدام مفاتيح الوصول هذه، عادة مع مفتاح ALT + SHIFT + مفتاح ALT +"
"These access keys may be used": "قد يتم استخدام مفاتيح الوصول هذه، عادة مع مفتاح ALT + SHIFT + مفتاح ALT +",
"Show numbers of accounts within instance metadata": "إظهار عدد الحسابات داخل البيانات الوصفية للمثيلات",
"Show version number within instance metadata": "إظهار رقم الإصدار داخل البيانات الوصفية للمثيل"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Botó Veure",
"enterPetname": "Introduïu PETNAME",
"enterNotes": "Introduïu notes",
"These access keys may be used": "Es poden utilitzar aquestes tecles d'accés, típicament amb Alt + Maj + tecla o Alt + clau"
"These access keys may be used": "Es poden utilitzar aquestes tecles d'accés, típicament amb Alt + Maj + tecla o Alt + clau",
"Show numbers of accounts within instance metadata": "Mostra el nombre de comptes a les metadades de la instància",
"Show version number within instance metadata": "Mostra el número de versió a les metadades de la instància"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Gweld y botwm",
"enterPetname": "Rhowch enw PETName",
"enterNotes": "Rhowch nodiadau",
"These access keys may be used": "Gellir defnyddio'r allweddi mynediad hyn, fel arfer gyda ALT + Shift + Allwedd Allwedd neu ALT +"
"These access keys may be used": "Gellir defnyddio'r allweddi mynediad hyn, fel arfer gyda ALT + Shift + Allwedd Allwedd neu ALT +",
"Show numbers of accounts within instance metadata": "Dangos nifer y cyfrifon o fewn metadata",
"Show version number within instance metadata": "Dangos rhif y fersiwn o fewn metadata"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Schaltfläche anzeigen",
"enterPetname": "Petname eingeben",
"enterNotes": "Notizen eingeben",
"These access keys may be used": "Diese Zugriffstasten können verwendet werden, typischerweise mit ALT + SHIFT + -Taste oder ALT + -Taste"
"These access keys may be used": "Diese Zugriffstasten können verwendet werden, typischerweise mit ALT + SHIFT + -Taste oder ALT + -Taste",
"Show numbers of accounts within instance metadata": "Anzahl der Konten in Instanzmetadaten anzeigen",
"Show version number within instance metadata": "Versionsnummer in Instanzmetadaten anzeigen"
}

View File

@ -437,5 +437,7 @@
"viewButton": "View button",
"enterPetname": "Enter petname",
"enterNotes": "Enter notes",
"These access keys may be used": "These access keys may be used, typically with ALT + SHIFT + key or ALT + key"
"These access keys may be used": "These access keys may be used, typically with ALT + SHIFT + key or ALT + key",
"Show numbers of accounts within instance metadata": "Show numbers of accounts within instance metadata",
"Show version number within instance metadata": "Show version number within instance metadata"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Botón de vista",
"enterPetname": "Entrar en nombre de pettname",
"enterNotes": "Ingresar notas",
"These access keys may be used": "Se pueden usar estas teclas de acceso, típicamente con teclas ALT + MAYÚS + teclas o ALT +"
"These access keys may be used": "Se pueden usar estas teclas de acceso, típicamente con teclas ALT + MAYÚS + teclas o ALT +",
"Show numbers of accounts within instance metadata": "Muestra el número de cuentas dentro de los metadatos de la instancia.",
"Show version number within instance metadata": "Mostrar el número de versión dentro de los metadatos de la instancia"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Bouton d'affichage",
"enterPetname": "Entrez PETNAME",
"enterNotes": "Faire entrer des notes",
"These access keys may be used": "Ces touches d'accès peuvent être utilisées typiquement avec une touche Alt + Maj + ou Alt +"
"These access keys may be used": "Ces touches d'accès peuvent être utilisées typiquement avec une touche Alt + Maj + ou Alt +",
"Show numbers of accounts within instance metadata": "Afficher le nombre de comptes dans les métadonnées de l'instance",
"Show version number within instance metadata": "Afficher le numéro de version dans les métadonnées de l'instance"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Féach an cnaipe",
"enterPetname": "Cuir isteach PetName",
"enterNotes": "Cuir nótaí isteach",
"These access keys may be used": "Is féidir na heochracha rochtana seo a úsáid, de ghnáth le Alt + Shift + Eochair nó Alt + Eochair"
"These access keys may be used": "Is féidir na heochracha rochtana seo a úsáid, de ghnáth le Alt + Shift + Eochair nó Alt + Eochair",
"Show numbers of accounts within instance metadata": "Taispeáin líon na gcuntas laistigh de mheiteashonraí",
"Show version number within instance metadata": "Taispeáin uimhir an leagain laistigh de mheiteashonraí"
}

View File

@ -437,5 +437,7 @@
"viewButton": "देखें बटन",
"enterPetname": "PETNAME दर्ज करें",
"enterNotes": "नोट्स दर्ज करें",
"These access keys may be used": "इन एक्सेस कुंजियों का उपयोग किया जा सकता है, आमतौर पर Alt + Shift + कुंजी या Alt + कुंजी के साथ"
"These access keys may be used": "इन एक्सेस कुंजियों का उपयोग किया जा सकता है, आमतौर पर Alt + Shift + कुंजी या Alt + कुंजी के साथ",
"Show numbers of accounts within instance metadata": "उदाहरण मेटाडेटा के भीतर खातों की संख्या दिखाएं",
"Show version number within instance metadata": "उदाहरण मेटाडेटा के भीतर संस्करण संख्या दिखाएं"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Visualizza il pulsante",
"enterPetname": "Inserisci PetName",
"enterNotes": "Inserisci le note",
"These access keys may be used": "Questi tasti di accesso possono essere utilizzati, in genere con tasto ALT + MAIUSC + o ALT + Key"
"These access keys may be used": "Questi tasti di accesso possono essere utilizzati, in genere con tasto ALT + MAIUSC + o ALT + Key",
"Show numbers of accounts within instance metadata": "Mostra il numero di account all'interno dei metadati dell'istanza",
"Show version number within instance metadata": "Mostra il numero di versione nei metadati dell'istanza"
}

View File

@ -437,5 +437,7 @@
"viewButton": "ボタンを見る",
"enterPetname": "PetNameを入力してください",
"enterNotes": "ノートを入力してください",
"These access keys may be used": "これらのアクセスキーは、通常はAlt + Shift +キーまたはAlt +キーを使用して使用できます。"
"These access keys may be used": "これらのアクセスキーは、通常はAlt + Shift +キーまたはAlt +キーを使用して使用できます。",
"Show numbers of accounts within instance metadata": "インスタンスメタデータ内のアカウント数を表示する",
"Show version number within instance metadata": "インスタンスメタデータ内にバージョン番号を表示する"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Bişkoja View",
"enterPetname": "Porê binivîse",
"enterNotes": "Nîşan binivîse",
"These access keys may be used": "Dibe ku ev keysên gihîştinê bikar bînin, bi gelemperî bi alt + shift + key an alt + key"
"These access keys may be used": "Dibe ku ev keysên gihîştinê bikar bînin, bi gelemperî bi alt + shift + key an alt + key",
"Show numbers of accounts within instance metadata": "Di nav metadata mînakê de hejmarên hesaban nîşan bidin",
"Show version number within instance metadata": "Di nav metadata mînakê de nimreya guhertoyê nîşan bide"
}

View File

@ -433,5 +433,7 @@
"viewButton": "View button",
"enterPetname": "Enter petname",
"enterNotes": "Enter notes",
"These access keys may be used": "These access keys may be used, typically with ALT + SHIFT + key or ALT + key"
"These access keys may be used": "These access keys may be used, typically with ALT + SHIFT + key or ALT + key",
"Show numbers of accounts within instance metadata": "Show numbers of accounts within instance metadata",
"Show version number within instance metadata": "Show version number within instance metadata"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Botão de visualização",
"enterPetname": "Digite Petname",
"enterNotes": "Digite notas",
"These access keys may be used": "Essas teclas de acesso podem ser usadas, normalmente com tecla Alt + Shift + Key ou Alt +"
"These access keys may be used": "Essas teclas de acesso podem ser usadas, normalmente com tecla Alt + Shift + Key ou Alt +",
"Show numbers of accounts within instance metadata": "Mostra o número de contas nos metadados da instância",
"Show version number within instance metadata": "Mostrar o número da versão nos metadados da instância"
}

View File

@ -437,5 +437,7 @@
"viewButton": "Кнопка просмотра",
"enterPetname": "Введите petname",
"enterNotes": "Введите ноты",
"These access keys may be used": "Эти ключевые ключи доступа могут быть использованы, обычно с ALT + Shift + Key или Alt + Key"
"These access keys may be used": "Эти ключевые ключи доступа могут быть использованы, обычно с ALT + Shift + Key или Alt + Key",
"Show numbers of accounts within instance metadata": "Показать количество учетных записей в метаданных экземпляра",
"Show version number within instance metadata": "Показать номер версии в метаданных экземпляра"
}

View File

@ -437,5 +437,7 @@
"viewButton": "查看按钮",
"enterPetname": "进入宠物名",
"enterNotes": "输入笔记",
"These access keys may be used": "可以使用这些访问密钥通常使用Alt + Shift +键或ALT +键"
"These access keys may be used": "可以使用这些访问密钥通常使用Alt + Shift +键或ALT +键",
"Show numbers of accounts within instance metadata": "显示实例元数据中的帐户数",
"Show version number within instance metadata": "在实例元数据中显示版本号"
}

View File

@ -1350,6 +1350,33 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
instanceStr += \
' <br><label class="labels">' + \
translate['Security'] + '</label><br>\n'
nodeInfoStr = \
translate['Show numbers of accounts within instance metadata']
if getConfigParam(baseDir, "showNodeInfoAccounts"):
instanceStr += \
' <input type="checkbox" class="profilecheckbox" ' + \
'name="showNodeInfoAccounts" checked> ' + \
nodeInfoStr + '<br>\n'
else:
instanceStr += \
' <input type="checkbox" class="profilecheckbox" ' + \
'name="showNodeInfoAccounts"> ' + \
nodeInfoStr + '<br>\n'
nodeInfoStr = \
translate['Show version number within instance metadata']
if getConfigParam(baseDir, "showNodeInfoVersion"):
instanceStr += \
' <input type="checkbox" class="profilecheckbox" ' + \
'name="showNodeInfoVersion" checked> ' + \
nodeInfoStr + '<br>\n'
else:
instanceStr += \
' <input type="checkbox" class="profilecheckbox" ' + \
'name="showNodeInfoVersion"> ' + \
nodeInfoStr + '<br>\n'
if getConfigParam(baseDir, "verifyAllSignatures"):
instanceStr += \
' <input type="checkbox" class="profilecheckbox" ' + \
@ -1360,6 +1387,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
' <input type="checkbox" class="profilecheckbox" ' + \
'name="verifyallsignatures"> ' + \
translate['Verify all signatures'] + '<br>\n'
instanceStr += translate['Enabling broch mode'] + '<br>\n'
if getConfigParam(baseDir, "brochMode"):
instanceStr += \