mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
fix(openmetrics): Allow openmetrics in info.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
7c83a5bb99
commit
45bae0ea48
7 changed files with 58 additions and 12 deletions
|
|
@ -67,6 +67,8 @@
|
|||
maxOccurs="1"/>
|
||||
<xs:element name="collaboration" type="collaboration" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="openmetrics" type="openmetrics" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="sabre" type="sabre" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="public" type="public" minOccurs="0"
|
||||
|
|
@ -408,16 +410,16 @@
|
|||
|
||||
<xs:complexType name="settings">
|
||||
<xs:sequence>
|
||||
<xs:element name="admin" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="admin" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-section" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="personal" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="personal-section" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-delegation" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-delegation-section" type="php-class" minOccurs="0"
|
||||
<xs:element name="admin-delegation" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-delegation-section" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
|
@ -529,6 +531,18 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="openmetrics">
|
||||
<xs:sequence>
|
||||
<xs:element name="exporter" type="openmetrics-exporter" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="openmetrics-exporter">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="php-class"/>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="sabre">
|
||||
<xs:sequence>
|
||||
<xs:element name="collections" type="sabre-collections" minOccurs="0" maxOccurs="1"/>
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@
|
|||
maxOccurs="1"/>
|
||||
<xs:element name="collaboration" type="collaboration" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="openmetrics" type="openmetrics" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="sabre" type="sabre" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:element name="trash" type="trash" minOccurs="0"
|
||||
|
|
@ -404,16 +406,16 @@
|
|||
|
||||
<xs:complexType name="settings">
|
||||
<xs:sequence>
|
||||
<xs:element name="admin" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-section" type="php-class" minOccurs="0"
|
||||
<xs:element name="admin" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-section" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="personal" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="personal-section" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-delegation" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-delegation-section" type="php-class" minOccurs="0"
|
||||
<xs:element name="admin-delegation" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
<xs:element name="admin-delegation-section" type="php-class" minOccurs="0"
|
||||
maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
|
@ -525,6 +527,18 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="openmetrics">
|
||||
<xs:sequence>
|
||||
<xs:element name="exporter" type="openmetrics-exporter" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="openmetrics-exporter">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="php-class"/>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="sabre">
|
||||
<xs:sequence>
|
||||
<xs:element name="collections" type="sabre-collections" minOccurs="0" maxOccurs="1"/>
|
||||
|
|
|
|||
|
|
@ -91,5 +91,11 @@
|
|||
"admin-section": [],
|
||||
"personal": [],
|
||||
"personal-section": []
|
||||
},
|
||||
"openmetrics": {
|
||||
"exporter": [
|
||||
"OC\\OpenMetrics\\Exporters\\ActiveSessions",
|
||||
"OC\\OpenMetrics\\Exporters\\ActiveUsers"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,9 @@
|
|||
<owncloud min-version="7.0.1" max-version="8" />
|
||||
<backend>caldav</backend>
|
||||
</dependencies>
|
||||
|
||||
<openmetrics>
|
||||
<exporter>OC\OpenMetrics\Exporters\ActiveSessions</exporter>
|
||||
<exporter>OC\OpenMetrics\Exporters\ActiveUsers</exporter>
|
||||
</openmetrics>
|
||||
</info>
|
||||
|
|
|
|||
|
|
@ -46,5 +46,10 @@
|
|||
"personal-section": []
|
||||
},
|
||||
"two-factor-providers": [],
|
||||
"types": []
|
||||
"types": [],
|
||||
"openmetrics": {
|
||||
"exporter": [
|
||||
"OC\\OpenMetrics\\Exporters\\ActiveUsers"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,8 @@
|
|||
<dependencies>
|
||||
<nextcloud min-version="16" max-version="16"/>
|
||||
</dependencies>
|
||||
|
||||
<openmetrics>
|
||||
<exporter>OC\OpenMetrics\Exporters\ActiveUsers</exporter>
|
||||
</openmetrics>
|
||||
</info>
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ class InfoParserTest extends TestCase {
|
|||
|
||||
public static function providesInfoXml(): array {
|
||||
return [
|
||||
['expected-info.json', 'valid-info.xml'],
|
||||
[null, 'invalid-info.xml'],
|
||||
['expected-info.json', 'valid-info.xml'],
|
||||
[null, 'invalid-info.xml'],
|
||||
['navigation-one-item.json', 'navigation-one-item.xml'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue