Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 2517: improve filestore pages generating with xsl #2588

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

NikitaMsln
Copy link
Contributor

Copy link
Contributor

Hi! Thank you for contributing!
The tests on this PR will run after a maintainer adds an ok-to-test label to this PR manually. Thank you for your patience!

@NikitaMsln NikitaMsln force-pushed the users/nikitamsln/add-xml-render branch from dd48920 to f93205e Compare December 5, 2024 09:55
@yegorskii yegorskii added the ok-to-test Label to approve test launch for external members label Dec 5, 2024
@github-actions github-actions bot removed the ok-to-test Label to approve test launch for external members label Dec 5, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit f93205e.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
6167 6147 0 4 16 0

Copy link
Collaborator

@qkrorlqr qkrorlqr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идея понятна, но надо разбить на более мелкие PR:

  1. xsl_render-либа с юниттестами
  2. поддержка дампа конфигов в XML помимо HTML
  3. PR с переводом service monitoring на XML+XSL
  4. PR с переводом tablet monitoring на XML+XSL

@@ -106,6 +106,13 @@ void DumpImpl(
}
}

template <typename T>
TString DumpImpl(const T& value) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ не там

} \
using namespace NStorage::NTNodeWrapper;
TNodeWrapper wrapper(root.AddChild("config_properties", " "));
#define VHOST_CONFIG_DUMP(name, ...) \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ echo -n '#define VHOST_CONFIG_DUMP(name, ...)                                            \'|wc -c
81

@@ -8,10 +8,12 @@ SRCS(
PEERDIR(
cloud/filestore/libs/endpoint
cloud/filestore/libs/service
cloud/filestore/libs/client
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не по алфавиту

@@ -129,6 +129,13 @@ void DumpImpl(const TVector<TString>& value, IOutputStream& os)
}
}

template <typename T>
TString DumpImpl(const T& value) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ не там


<xsl:template match="root">
<xsl:choose>
<xsl:when test="has_data">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

императивный стиль (if/else/for/etc.) в xslt - моветон, но лучше это обсудить в отдельном PR

#include "xml_document.h"

namespace NCloud::NStorage::NTNodeWrapper {
TNodeWrapper::TNodeWrapper(NXml::TNode root) : Root(root) {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

перед declaration / definition мы обычно пишем отбивку из /////...

@@ -0,0 +1,33 @@
#pragma once

#ifdef THROW
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

что за жуть, зачем это?


namespace NCloud::NStorage::NTNodeWrapper {

class TNodeWrapper {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ не там

TXslInitializer xslInit;
} // namespace

void NCloud::NStorage::NXSLRender::NXSLRender(const char* xsl, const NXml::TDocument& document, IOutputStream& out) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

длинная строка

#include "xml_document.h"

namespace NCloud::NStorage::NXSLRender {
void NXSLRender(const char* xsl, const NXml::TDocument& document, IOutputStream& out);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а почему NXSL, а не XSL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants