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 # on all incoming posts
if path.startswith('/users/' + if path.startswith('/users/' +
adminNickname + '/'): 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 verifyAllSignatures = False
if fields.get('verifyallsignatures'): if fields.get('verifyallsignatures'):
if fields['verifyallsignatures'] == 'on': if fields['verifyallsignatures'] == 'on':

View File

@ -437,5 +437,7 @@
"viewButton": "عرض زر", "viewButton": "عرض زر",
"enterPetname": "أدخل PETNAME", "enterPetname": "أدخل PETNAME",
"enterNotes": "أدخل الملاحظات", "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", "viewButton": "Botó Veure",
"enterPetname": "Introduïu PETNAME", "enterPetname": "Introduïu PETNAME",
"enterNotes": "Introduïu notes", "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", "viewButton": "Gweld y botwm",
"enterPetname": "Rhowch enw PETName", "enterPetname": "Rhowch enw PETName",
"enterNotes": "Rhowch nodiadau", "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", "viewButton": "Schaltfläche anzeigen",
"enterPetname": "Petname eingeben", "enterPetname": "Petname eingeben",
"enterNotes": "Notizen 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", "viewButton": "View button",
"enterPetname": "Enter petname", "enterPetname": "Enter petname",
"enterNotes": "Enter notes", "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", "viewButton": "Botón de vista",
"enterPetname": "Entrar en nombre de pettname", "enterPetname": "Entrar en nombre de pettname",
"enterNotes": "Ingresar notas", "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", "viewButton": "Bouton d'affichage",
"enterPetname": "Entrez PETNAME", "enterPetname": "Entrez PETNAME",
"enterNotes": "Faire entrer des notes", "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", "viewButton": "Féach an cnaipe",
"enterPetname": "Cuir isteach PetName", "enterPetname": "Cuir isteach PetName",
"enterNotes": "Cuir nótaí isteach", "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": "देखें बटन", "viewButton": "देखें बटन",
"enterPetname": "PETNAME दर्ज करें", "enterPetname": "PETNAME दर्ज करें",
"enterNotes": "नोट्स दर्ज करें", "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", "viewButton": "Visualizza il pulsante",
"enterPetname": "Inserisci PetName", "enterPetname": "Inserisci PetName",
"enterNotes": "Inserisci le note", "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": "ボタンを見る", "viewButton": "ボタンを見る",
"enterPetname": "PetNameを入力してください", "enterPetname": "PetNameを入力してください",
"enterNotes": "ノートを入力してください", "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", "viewButton": "Bişkoja View",
"enterPetname": "Porê binivîse", "enterPetname": "Porê binivîse",
"enterNotes": "Nîşan 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", "viewButton": "View button",
"enterPetname": "Enter petname", "enterPetname": "Enter petname",
"enterNotes": "Enter notes", "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", "viewButton": "Botão de visualização",
"enterPetname": "Digite Petname", "enterPetname": "Digite Petname",
"enterNotes": "Digite notas", "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": "Кнопка просмотра", "viewButton": "Кнопка просмотра",
"enterPetname": "Введите petname", "enterPetname": "Введите petname",
"enterNotes": "Введите ноты", "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": "查看按钮", "viewButton": "查看按钮",
"enterPetname": "进入宠物名", "enterPetname": "进入宠物名",
"enterNotes": "输入笔记", "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 += \ instanceStr += \
' <br><label class="labels">' + \ ' <br><label class="labels">' + \
translate['Security'] + '</label><br>\n' 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"): if getConfigParam(baseDir, "verifyAllSignatures"):
instanceStr += \ instanceStr += \
' <input type="checkbox" class="profilecheckbox" ' + \ ' <input type="checkbox" class="profilecheckbox" ' + \
@ -1360,6 +1387,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
' <input type="checkbox" class="profilecheckbox" ' + \ ' <input type="checkbox" class="profilecheckbox" ' + \
'name="verifyallsignatures"> ' + \ 'name="verifyallsignatures"> ' + \
translate['Verify all signatures'] + '<br>\n' translate['Verify all signatures'] + '<br>\n'
instanceStr += translate['Enabling broch mode'] + '<br>\n' instanceStr += translate['Enabling broch mode'] + '<br>\n'
if getConfigParam(baseDir, "brochMode"): if getConfigParam(baseDir, "brochMode"):
instanceStr += \ instanceStr += \