mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
chore: Add Github Issue templates & webui sysinfo (#681)
* chore: better gh templates * chore: add about - sysinfo to gh issues * fix: Webui freeze on auth error * Split Git Remote to own field * Move CONTRIBUTING.md
This commit is contained in:
parent
70f93c7171
commit
b9ecd0e112
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improving Hyperion
|
||||
|
||||
---
|
||||
|
||||
<!-- Please don't delete this template or we'll close your issue -->
|
||||
<!-- Before creating an issue please make sure you are using the latest version of Hyperion. -->
|
||||
|
||||
<!-- Please confirm you will submit an issue. -->
|
||||
<!-- Issues which contain questions or support requests will be closed. -->
|
||||
<!-- (Update "[ ]" to "[x]" to check a box) -->
|
||||
|
||||
- [x] I confirm that this is an issue rather than a question.
|
||||
|
||||
<!-- Please ask questions here -->
|
||||
<!-- https://hyperion-project.org -->
|
||||
|
||||
## Bug report
|
||||
|
||||
|
||||
#### Steps to reproduce
|
||||
|
||||
|
||||
#### What is expected?
|
||||
|
||||
|
||||
#### What is actually happening?
|
||||
|
||||
|
||||
#### System
|
||||
<!-- Your system information - please copy paste "System info (Github Issue)" section from web configuration/system/about -->
|
22
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
22
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for Hyperion
|
||||
|
||||
---
|
||||
|
||||
<!-- Please don't delete this template or we'll close your issue -->
|
||||
<!-- Before creating an issue please make sure you are using the latest version of Hyperion. -->
|
||||
|
||||
## Feature request
|
||||
|
||||
<!-- Please ask questions on our Forum. -->
|
||||
<!-- https://hyperion-project.org -->
|
||||
<!-- Issues which contain questions or support requests will be closed. -->
|
||||
|
||||
#### What problem does this feature solve?
|
||||
|
||||
#### What does the proposed API look like?
|
||||
|
||||
#### How should this be implemented in your opinion?
|
||||
|
||||
#### Are you willing to work on this yourself?
|
39
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
39
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<!-- Please don't delete this template -->
|
||||
|
||||
<!-- PULL REQUEST TEMPLATE -->
|
||||
<!-- (Update "[ ]" to "[x]" to check a box) -->
|
||||
|
||||
**Summary**
|
||||
|
||||
**What kind of change does this PR introduce?** (check at least one)
|
||||
|
||||
- [ ] Bugfix
|
||||
- [ ] Feature
|
||||
- [ ] Code style update
|
||||
- [ ] Refactor
|
||||
- [ ] Docs
|
||||
- [ ] Build-related changes
|
||||
- [ ] Other, please describe:
|
||||
|
||||
If changing the UI of web configuration, please provide the **before/after** screenshot:
|
||||
|
||||
**Does this PR introduce a breaking change?** (check one)
|
||||
|
||||
- [ ] Yes
|
||||
- [ ] No
|
||||
|
||||
If yes, please describe the impact and migration path for existing setups:
|
||||
|
||||
**The PR fulfills these requirements:**
|
||||
|
||||
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
|
||||
|
||||
If adding a **new feature**, the PR's description includes:
|
||||
|
||||
- [ ] A convincing reason for adding this feature
|
||||
- [ ] Related documents have been updated (docs/docs/en)
|
||||
- [ ] Related tests have been updated
|
||||
|
||||
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.
|
||||
|
||||
**Other information:**
|
@ -1,61 +0,0 @@
|
||||
### Please use the following code style/guidelines
|
||||
|
||||
- use QT wherever it's possible (except there is a good reason)
|
||||
- use unix line endings (not windows)
|
||||
- indent your code with TABs instead of spaces
|
||||
- your files should end with a newline
|
||||
- names are camel case
|
||||
- use utf8 file encoding (ANSI encoding is strictly forbidden!)
|
||||
- use speaking names for variables.
|
||||
- avoid code dups -> if you write similar code blocks more the 2 times -> refactoring!
|
||||
- avoid compiler macros (#ifdef #define ...) where possible
|
||||
- class member variables must prefixed with underscore `int _myMemberVar`
|
||||
- follow this rule for curly brackets
|
||||
|
||||
```
|
||||
bad:
|
||||
if (conditon) {
|
||||
code
|
||||
}
|
||||
|
||||
good:
|
||||
if (condition)
|
||||
{
|
||||
code
|
||||
}
|
||||
```
|
||||
- initializer list on constructors:
|
||||
|
||||
```
|
||||
bad:
|
||||
MyClass::MyClass()
|
||||
: myVarA(0), myVarB("eee"), myVarC(true)
|
||||
{
|
||||
}
|
||||
|
||||
MyClass::MyClass() : myVarA(0),
|
||||
myVarB("eee"),
|
||||
myVarC(true)
|
||||
{
|
||||
}
|
||||
|
||||
good:
|
||||
MyClass::MyClass()
|
||||
: myVarA(0)
|
||||
, myVarB("eee")
|
||||
, myVarC(true)
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
- pointer declaration
|
||||
|
||||
```
|
||||
bad:
|
||||
int *foo;
|
||||
int * fooFoo;
|
||||
|
||||
good:
|
||||
int* foo;
|
||||
```
|
||||
|
123
CONTRIBUTING.md
Normal file
123
CONTRIBUTING.md
Normal file
@ -0,0 +1,123 @@
|
||||
## Translations
|
||||
You can participate in the translation.
|
||||
[![Join Translation](https://img.shields.io/badge/POEditor-translate-green.svg)](https://poeditor.com/join/project/Y4F6vHRFjA)
|
||||
|
||||
## Development Setup
|
||||
|
||||
> TODO: Be more specific, provide a Visual Studio Code workspace with plugins and pre configured build tasks
|
||||
|
||||
Get Hyperion to compile: [Compile HowTo](CompileHowTo.md)
|
||||
|
||||
## Workflow
|
||||
|
||||
### Issue
|
||||
|
||||
> TODO
|
||||
|
||||
### Pull requests
|
||||
|
||||
- Create a feature branch from the default branch (`master`) and merge back against that branch.
|
||||
- It's OK to have multiple small commits as you work on the PR - GitHub automatically squashes them before merging.
|
||||
- Make sure tests pass.
|
||||
- If adding a new feature:
|
||||
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
|
||||
- If fixing bug:
|
||||
- If you are resolving an open issue, add `(fix #xxxx)` (`#xxxx` being the issue ID) in your PR title for a better release log, e.g. `chore(feat): implement SSR (fix #1234)`.
|
||||
- Provide a detailed description of the bug in the PR.
|
||||
|
||||
## Code Specification
|
||||
|
||||
- use QT wherever it's possible (except there is a good reason)
|
||||
- use unix line endings (not windows)
|
||||
- indent your code with TABs instead of spaces
|
||||
- your files should end with a newline
|
||||
- names are camel case
|
||||
- use utf8 file encoding (ANSI encoding is strictly forbidden!)
|
||||
- use speaking names for variables.
|
||||
- avoid code dups -> if you write similar code blocks more the 2 times -> refactoring!
|
||||
- avoid compiler macros (#ifdef #define ...) where possible
|
||||
- class member variables must prefixed with underscore `int _myMemberVar`
|
||||
- initializer list on constructors:
|
||||
|
||||
```c++
|
||||
bad:
|
||||
MyClass::MyClass()
|
||||
: myVarA(0), myVarB("eee"), myVarC(true)
|
||||
{
|
||||
}
|
||||
|
||||
MyClass::MyClass() : myVarA(0),
|
||||
myVarB("eee"),
|
||||
myVarC(true)
|
||||
{
|
||||
}
|
||||
|
||||
good:
|
||||
MyClass::MyClass()
|
||||
: myVarA(0)
|
||||
, myVarB("eee")
|
||||
, myVarC(true)
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
- pointer declaration
|
||||
|
||||
```c++
|
||||
bad:
|
||||
int *foo;
|
||||
int * fooFoo;
|
||||
|
||||
good:
|
||||
int* foo;
|
||||
```
|
||||
|
||||
### Logger
|
||||
Hyperion has a own logger class with different log levels.
|
||||
- Use macros in include/utils/logger.h
|
||||
- Don't use the Logger class directly unless there is a good reason to do so.
|
||||
``` c++
|
||||
// *** including
|
||||
#include <utils/logger.h>
|
||||
|
||||
// creating
|
||||
// get a logger, this will create a logger named MAIN with min loglevel INFO, DEBUG messages won't displayed
|
||||
Logger * log_main = Logger::getInstance("MAIN");
|
||||
|
||||
// get a logger, this will create a logger named MAIN with min loglevel DEBUG, all messages displayed
|
||||
Logger * log_main = Logger::getInstance("MAIN", Logger::DEBUG);
|
||||
|
||||
// using
|
||||
// basic
|
||||
Debug( log_main, "hello folks!");
|
||||
Info( log_main, "hello again!");
|
||||
Warning( log_main, "something is crazy");
|
||||
Error( log_main, "oh to crazy, aborting");
|
||||
|
||||
// quick logging, when only one message exists and want no typing overhead - or usage in static functions
|
||||
Info( Logger::getInstance("LedDevice"), "Leddevice %s started", "PublicStreetLighting");
|
||||
|
||||
// a bit mor complex - with printf like format
|
||||
Info( log_main, "hello %s, you have %d messages", "Dax", 25);
|
||||
|
||||
// conditional messages
|
||||
WarningIf( (value>threshold), log_main, "Alert, your value is greater then %d", threshold );
|
||||
```
|
||||
The amount of "%" mus match with following arguments
|
||||
|
||||
#### The Placeholders
|
||||
- %s for strings (this are cstrings, when having std::string use myStdString.c_str() to convert)
|
||||
- %d for integer numbers
|
||||
- %f for float numbers
|
||||
- more placeholders possible, see [here](http://www.cplusplus.com/reference/cstdio/printf/)
|
||||
|
||||
#### Log Level
|
||||
* Debug - used when message is more or less for the developer or for trouble shooting
|
||||
* Info - used for not absolutly developer stuff messages for what's going on
|
||||
* Warning - warn if something is not as it should be, but didn't harm
|
||||
* Error - used when an error occurs
|
||||
|
||||
|
||||
## Commit specification
|
||||
|
||||
> TODO
|
@ -38,6 +38,7 @@
|
||||
|
||||
// the hyperion build id string
|
||||
#define HYPERION_BUILD_ID "${HYPERION_BUILD_ID}"
|
||||
#define HYPERION_GIT_REMOTE "${HYPERION_GIT_REMOTE}"
|
||||
|
||||
#define HYPERION_VERSION_MAJOR "${HYPERION_VERSION_MAJOR}"
|
||||
#define HYPERION_VERSION_MINOR "${HYPERION_VERSION_MINOR}"
|
||||
|
@ -1,9 +0,0 @@
|
||||
BEFORE YOU OPEN A NEW ISSUE!
|
||||
|
||||
Search at our wiki: wiki.hyperion-project.org
|
||||
Our FAQ: https://hyperion-project.org/wiki/FAQ-Frequently-Asked-Questions
|
||||
And have a look at our forum: forum.hyperion-project.org
|
||||
If you need help please open a new thread their!
|
||||
|
||||
WE PROVIDE NO SUPPORT AT GITHUB!
|
||||
All misleading issues will be closed without a announcement!
|
@ -1,9 +0,0 @@
|
||||
|
||||
**1.** Tell us something about your changes.
|
||||
|
||||
**2.** If this changes affect the .conf file. Please provide the changed section
|
||||
|
||||
**3.** Reference an issue (optional)
|
||||
|
||||
Note: For further discussions use our forum: forum.hyperion-project.org
|
||||
|
@ -1,11 +1,12 @@
|
||||
<div class="container-fluid">
|
||||
<h3 class="page-header"><i class="fa fa-info-circle fa-fw"></i><span data-i18n="main_menu_about_token">About Hyperion</span></h3>
|
||||
<h3 class="page-header"><i class="fa fa-info-circle fa-fw"></i><span data-i18n="main_menu_about_token">About
|
||||
Hyperion</span></h3>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div id="about_cont"></div>
|
||||
|
||||
</div>
|
||||
<div id="danger_act"class="col-lg-6" style="display:none;padding-top:20px">
|
||||
<div id="danger_act" class="col-lg-6" style="display:none;padding-top:20px">
|
||||
<h4>You found a hidden service menu!</h4>
|
||||
<button id="reset_cache" class="btn btn-danger">Reset Browser Cache</button>
|
||||
<button id="hyp_restart" class="btn btn-danger">Force Hyperion Restart</button>
|
||||
@ -17,54 +18,70 @@
|
||||
performTranslation();
|
||||
|
||||
var si = sysInfo.hyperion;
|
||||
var libs = {"Bootstrap 3" : "http://getbootstrap.com/", "JQuery" : "https://jquery.com/", "Bootstrap Colorpicker" : "https://itsjavi.com/bootstrap-colorpicker/", "JSON-Editor" : "http://jeremydorn.com/json-editor/", "jQuery.i18n" : "https://github.com/wikimedia/jquery.i18n", "metisMenu" : "http://mm.onokumus.com/index.html", "download.js" : "http://danml.com/download.html", "gijgo" : "http://gijgo.com/"};
|
||||
var libs = { "Bootstrap 3": "http://getbootstrap.com/", "JQuery": "https://jquery.com/", "Bootstrap Colorpicker": "https://itsjavi.com/bootstrap-colorpicker/", "JSON-Editor": "http://jeremydorn.com/json-editor/", "jQuery.i18n": "https://github.com/wikimedia/jquery.i18n", "metisMenu": "http://mm.onokumus.com/index.html", "download.js": "http://danml.com/download.html", "gijgo": "http://gijgo.com/" };
|
||||
var libh = "";
|
||||
var lang = [];
|
||||
var dcount = 0;
|
||||
|
||||
for(var i = 0; i<availLang.length; i++)
|
||||
lang.push($.i18n('general_speech_'+availLang[i]));
|
||||
for(key in libs)
|
||||
libh += '<a href="'+libs[key]+'" target="_blank">'+key+'</a>, ';
|
||||
libh += "<br/>"+$.i18n("about_credits");
|
||||
lang = lang.toString().replace(/,/g,", ");
|
||||
for (var i = 0; i < availLang.length; i++)
|
||||
lang.push($.i18n('general_speech_' + availLang[i]));
|
||||
for (key in libs)
|
||||
libh += '<a href="' + libs[key] + '" target="_blank">' + key + '</a>, ';
|
||||
libh += "<br/>" + $.i18n("about_credits");
|
||||
lang = lang.toString().replace(/,/g, ", ");
|
||||
|
||||
var fc = ['<span id="danger_trig">'+$.i18n("about_version")+'<span>',$.i18n("about_build"),$.i18n("about_builddate"),$.i18n("about_translations"),$.i18n("about_resources", $.i18n("general_webui_title")), $.i18n("about_3rd_party_licenses")];
|
||||
var sc = [currentVersion,si.build,si.time,'('+availLang.length+')<p>'+lang+'</p><p><a href="https://github.com/hyperion-project/hyperion.ng" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh, '<pre><div id="3rdpartylicenses" style="overflow:scroll;max-height:400px"></div></pre>'];
|
||||
// Github Issue bugreport infos
|
||||
var sys = window.sysInfo.system;
|
||||
var shy = window.sysInfo.hyperion;
|
||||
var info = "<pre>Hyperion Server: \n";
|
||||
info += '- Build: ' + shy.build + '\n';
|
||||
info += '- Build time: ' + shy.time + '\n';
|
||||
info += '- Git Remote: ' + shy.gitremote + '\n';
|
||||
info += '- Version: ' + shy.version + '\n';
|
||||
info += '- UI Lang: ' + storedLang + ' (BrowserLang: ' + navigator.language + ')\n';
|
||||
info += '- UI Access: ' + storedAccess + '\n';
|
||||
//info += 'Log lvl: ' + window.serverConfig.logger.level + '\n';
|
||||
info += '- Avail Capt: ' + window.serverInfo.grabbers.available + '\n\n';
|
||||
info += 'Hyperion Server OS: \n';
|
||||
info += '- Distribution: ' + sys.prettyName + '\n';
|
||||
info += '- Arch: ' + sys.architecture + '\n';
|
||||
info += '- Kernel: ' + sys.kernelType + ' (' + sys.kernelVersion + ' (WS: ' + sys.wordSize + '))\n';
|
||||
info += '- Browser: ' + navigator.userAgent + ' </pre>';
|
||||
|
||||
createTable("","atb","about_cont");
|
||||
for(var i = 0; i<fc.length; i++)
|
||||
$('.atb').append(createTableRow([fc[i],sc[i]], "atb", false));
|
||||
var fc = ['<span id="danger_trig">' + $.i18n("about_version") + '<span>', $.i18n("about_build"), $.i18n("about_builddate"), $.i18n("about_translations"), $.i18n("about_resources", $.i18n("general_webui_title")), "System info (Github Issue)", $.i18n("about_3rd_party_licenses")];
|
||||
var sc = [currentVersion, si.build, si.time, '(' + availLang.length + ')<p>' + lang + '</p><p><a href="https://github.com/hyperion-project/hyperion.ng" target="_blank">' + $.i18n("about_contribute") + '</a></p>', libh, info, '<pre><div id="3rdpartylicenses" style="overflow:scroll;max-height:400px"></div></pre>'];
|
||||
|
||||
$('#danger_trig').off().on('click',function(){
|
||||
createTable("", "atb", "about_cont");
|
||||
for (var i = 0; i < fc.length; i++)
|
||||
$('.atb').append(createTableRow([fc[i], sc[i]], "atb", false));
|
||||
|
||||
$('#danger_trig').off().on('click', function () {
|
||||
dcount++;
|
||||
if(dcount > 2)
|
||||
if (dcount > 2)
|
||||
$('#danger_act').toggle(true);
|
||||
});
|
||||
|
||||
$('#reset_cache').off().on('click',function(){
|
||||
$('#reset_cache').off().on('click', function () {
|
||||
localStorage.clear();
|
||||
});
|
||||
|
||||
$('#hyp_restart').off().on('click',function(){
|
||||
$('#hyp_restart').off().on('click', function () {
|
||||
initRestart();
|
||||
});
|
||||
|
||||
var url = 'https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/3RD_PARTY_LICENSES';
|
||||
fetch(url)
|
||||
.then(function(response) {
|
||||
if(!response.ok)
|
||||
{
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
$("#3rdpartylicenses").html('<a href="' + url + '">' + $.i18n("about_3rd_party_licenses_error") + '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
response.text().then(function(text) {
|
||||
$("#3rdpartylicenses").html('<code>'+text+'</code>');
|
||||
else {
|
||||
response.text().then(function (text) {
|
||||
$("#3rdpartylicenses").html('<code>' + text + '</code>');
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(function(rejected) {
|
||||
.catch(function (rejected) {
|
||||
$("#3rdpartylicenses").html('<a href="' + url + '">' + $.i18n("about_3rd_party_licenses_error") + '</a>');
|
||||
});
|
||||
|
||||
|
@ -79,7 +79,7 @@ $(document).ready( function() {
|
||||
}
|
||||
});
|
||||
|
||||
$(window.hyperion).one("cmd-authorize-login", function(event) {
|
||||
$(window.hyperion).on("cmd-authorize-login", function(event) {
|
||||
$("#main-nav").removeAttr('style')
|
||||
$("#top-navbar").removeAttr('style')
|
||||
|
||||
@ -104,7 +104,7 @@ $(document).ready( function() {
|
||||
}
|
||||
});
|
||||
|
||||
$(window.hyperion).one("cmd-authorize-newPasswordRequired", function(event) {
|
||||
$(window.hyperion).on("cmd-authorize-newPasswordRequired", function(event) {
|
||||
var loginToken = getStorage("loginToken", true)
|
||||
|
||||
if (event.response.info.newPasswordRequired == true)
|
||||
@ -129,7 +129,7 @@ $(document).ready( function() {
|
||||
}
|
||||
});
|
||||
|
||||
$(window.hyperion).one("cmd-authorize-adminRequired", function(event) {
|
||||
$(window.hyperion).on("cmd-authorize-adminRequired", function(event) {
|
||||
//Check if a admin login is required.
|
||||
//If yes: check if default pw is set. If no: go ahead to get server config and render page
|
||||
if (event.response.info.adminRequired === true)
|
||||
|
@ -6,7 +6,8 @@ execute_process( COMMAND sh -c "git remote --verbose | grep origin | grep fetch
|
||||
STRING ( STRIP "${BUILD_ID}" BUILD_ID )
|
||||
STRING ( STRIP "${VERSION_ID}" VERSION_ID )
|
||||
STRING ( STRIP "${GIT_REMOTE_PATH}" GIT_REMOTE_PATH )
|
||||
SET ( HYPERION_BUILD_ID "${VERSION_ID} (${BUILD_ID}) Git Remote: ${GIT_REMOTE_PATH}" )
|
||||
SET ( HYPERION_BUILD_ID "${VERSION_ID} (${BUILD_ID})" )
|
||||
SET ( HYPERION_GIT_REMOTE "${GIT_REMOTE_PATH}" )
|
||||
SET ( HYPERION_VERSION "${HYPERION_VERSION_CHANNEL} ${HYPERION_VERSION_MAJOR}.${HYPERION_VERSION_MINOR}.${HYPERION_VERSION_PATCH}" )
|
||||
message ( STATUS "Current Version: ${HYPERION_VERSION}" )
|
||||
message ( STATUS " - Build: ${HYPERION_BUILD_ID}" )
|
||||
|
@ -380,6 +380,7 @@ void JsonAPI::handleSysInfoCommand(const QJsonObject&, const QString& command, c
|
||||
hyperion["version" ] = QString(HYPERION_VERSION);
|
||||
hyperion["channel" ] = QString(HYPERION_VERSION_CHANNEL);
|
||||
hyperion["build" ] = QString(HYPERION_BUILD_ID);
|
||||
hyperion["gitremote" ] = QString(HYPERION_GIT_REMOTE);
|
||||
hyperion["time" ] = QString(__DATE__ " " __TIME__);
|
||||
hyperion["id" ] = _authManager->getID();
|
||||
info["hyperion"] = hyperion;
|
||||
|
Loading…
Reference in New Issue
Block a user