Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.67k stars 511 forks source link

MeshCentral ignores meshcentral-web folder #6168

Closed DaanSelen closed 3 weeks ago

DaanSelen commented 3 weeks ago

Describe the bug MeshCentral ignores meshcentral-web folder -- I have downloaded a custom MeshCentral UI from here: https://github.com/DaanSelen/meshcentral-material.git But once I move the meshcentral-web with the views and public to the meshcentral root folder, it does not work on a restart.

To Reproduce

  1. Download and install Meshcentral using npm and move the files to /opt/meshcentral
  2. Git clone the custom UI repository
  3. Move the meshcentral-web folder to /opt/meshcentral
  4. Restart the service
  5. No change. It does however create visual bugs. Such as some pop-ups becoming way too large: image

Expected behavior In the past, these steps would produce a new looking MeshCentral UI.

Screenshots image

Web-Page (In Dutch): image

Server Software (please complete the following information):

Client Device (please complete the following information):

Additional context Add any other context about the problem here.

Your config.json file

{
  "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
  "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
  "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
  "settings": {
    "_cert": "myserver.mydomain.com",
    "_WANonly": true,
    "_LANonly": true,
    "_sessionKey": "MyReallySecretPassword1",
    "_port": 443,
    "_aliasPort": 443,
    "_redirPort": 80,
    "_redirAliasPort": 80
  },
  "domains": {
    "": {
      "_title": "MyServer",
      "_title2": "Servername",
      "_minify": true,
      "_newAccounts": true,
      "_userNameIsEmail": true
    }
  },
  "_letsencrypt": {
    "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
    "email": "myemail@mydomain.com",
    "names": "myserver.mydomain.com",
    "skipChallengeVerification": true,
    "production": false
  }
}

Thanks in advance.

si458 commented 3 weeks ago

this might be because the default.handlebars hasnt been updated in the other repo. every time we change the default.handlebars file in the master repo, other people need to also update theres as the could be javascript changes/things moved placed you can see the last commit we did was only 2 weeks ago https://github.com/Ylianst/MeshCentral/commits/master/views/default.handlebars

si458 commented 3 weeks ago

also the default.handlebars is for ENGLISH so if you change the page to say french/german/etc, it wont use the version you want so you need to run the translate

  1. cd /opt/meshcentral/node_modules/meshcentral/translate
  2. node translate.js -> this will install extra packages and WILL FAIL BUT ITS OK!
  3. node translate.js -> run it again and this time it should now output info
  4. node translate.js --translate -> have a brew and wait 5-10mins
  5. restart meshcentral
  6. refresh ur web ui
DaanSelen commented 3 weeks ago

Yes, it was the language setting which made it not work. Are those set into the handlebars?

Already answered, thanks.

DaanSelen commented 3 weeks ago

Excuse my reopening, but the commands regarding the translate.js I get this:

celdrith@mesh:/opt/meshcentral/node_modules/meshcentral/translate$ node translate --translate
MeshCentral web site translator
Usage "node translate.js [command] [options]
Possible commands:

  CHECK [files]
    Check will pull string out of a web page and display a report.

  EXTRACT [languagefile] [files]
    Extract strings from web pages and generate a language (.json) file.

  EXTRACTALL (languagefile)
    Extract all MeshCentral strings from web pages and generate the languages.json file.

  TRANSLATE [language] [languagefile] [files]
    Use a language (.json) file to translate web pages to a give language.

  TRANSLATEALL (languagefile) (language code)
    Translate all MeshCentral strings using the languages.json file.

  MINIFY [sourcefile]
    Minify a single file.

  MINIFYDIR [sourcedir] [destinationdir]
    Minify all files in a directory.

  MINIFYALL
    Minify the main MeshCentral english web pages.

  MERGE [sourcefile] [targetfile] [language code]
    Merge a language from a translation file into another translation file.

  TOTEXT [translationfile] [textfile] [language code]
    Save a text for with all strings of a given language.

  FROMTEXT [translationfile] [textfile] [language code]
    Import raw text string as translations for a language code.
si458 commented 3 weeks ago

DUPLICATE https://github.com/Ylianst/MeshCentral/issues/6022 looking into it soon

EDIT: you might need to run node node_modules/meshcentral --translate instead sorry