]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/motd.service.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / motd.service.ts
1 import { HttpClient } from '@angular/common/http';
2 import { Injectable } from '@angular/core';
3
4 import { Observable } from 'rxjs';
5
6 export interface Motd {
7 message: string;
8 md5: string;
9 severity: 'info' | 'warning' | 'danger';
10 // The expiration date in ISO 8601. Does not expire if empty.
11 expires: string;
12 }
13
14 @Injectable({
15 providedIn: 'root'
16 })
17 export class MotdService {
18 private url = 'ui-api/motd';
19
20 constructor(private http: HttpClient) {}
21
22 get(): Observable<Motd | null> {
23 return this.http.get<Motd | null>(this.url);
24 }
25 }