From e4eb5992736be0795d9e5929b683aa0c8d9602f6 Mon Sep 17 00:00:00 2001 From: "Khan, Sami" Date: Sun, 31 Jan 2021 16:54:15 -0600 Subject: [PATCH] feat: don't return internal ids and change FriendlyName to Name --- config.yaml | 2 +- internal/database/database.go | 2 +- internal/database/database_test.go | 10 +++--- internal/server/docs/docs.go | 2 +- internal/server/docs/swagger.json | 2 +- internal/server/docs/swagger.yaml | 2 +- internal/server/server_test.go | 4 +-- internal/yamlstore/yamlstore.go | 17 ++++------ internal/yamlstore/yamlstore_test.go | 32 +++++++++++++------ pkg/handlers/network.go | 2 +- pkg/handlers/network_test.go | 10 +++--- pkg/handlers/route.go | 2 +- pkg/handlers/route_test.go | 2 +- pkg/handlers/status.go | 14 +++----- pkg/handlers/status_test.go | 30 ++++++++--------- pkg/models/network.go | 6 ++-- pkg/models/status.go | 4 +-- pkg/usecases/network/network.go | 2 +- pkg/usecases/network/network_test.go | 8 ++--- pkg/usecases/status/status.go | 6 ++-- pkg/usecases/status/status_test.go | 10 +++--- .../config-site/config-site.component.html | 2 +- .../app/config/config/config.component.html | 2 +- ui/src/app/config/services/config.service.ts | 4 +-- .../site-card-xs/site-card-xs.component.html | 2 +- .../site-card/site-card.component.html | 2 +- .../dashboard/site-filter/site-filter.pipe.ts | 2 +- ui/src/app/shared/models/site.model.ts | 3 +- ui/src/app/status.state.ts | 6 ++-- 29 files changed, 96 insertions(+), 96 deletions(-) diff --git a/config.yaml b/config.yaml index 4981c12..a98ddc2 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -# filepath: simple-startpage.yaml +filepath: simple-startpage.yaml database: driver: "sqlite" name: "simple-startpage.db" diff --git a/internal/database/database.go b/internal/database/database.go index 39c541b..4dcf45e 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -113,7 +113,7 @@ func (d *DB) GetNetwork(net *models.Network) error { } func (d *DB) GetSite(site *models.Site) error { - result := d.conn.First(site) + result := d.conn.Where("name = ?", site.Name).First(site) return handleError(result.Error) } diff --git a/internal/database/database_test.go b/internal/database/database_test.go index 086efeb..aa9f6bb 100644 --- a/internal/database/database_test.go +++ b/internal/database/database_test.go @@ -102,8 +102,8 @@ func (suite *DatabaseSuite) TestDBFunctions() { {Name: "test-link-2"}, }, Sites: []models.Site{ - {FriendlyName: "test-site-1"}, - {FriendlyName: "test-site-2"}, + {Name: "test-site-1"}, + {Name: "test-site-2"}, }, } suite.NoError(db.CreateNetwork(&net)) @@ -118,13 +118,13 @@ func (suite *DatabaseSuite) TestDBFunctions() { suite.NoError(db.GetNetwork(&findNet)) // GetNetwork assertions suite.Equal("test", findNet.Network, "Network should be 'test'") - suite.Equal("test-site-1", findNet.Sites[0].FriendlyName, "Site FriendlyName should be 'test-site-1'") + suite.Equal("test-site-1", findNet.Sites[0].Name, "Site Name should be 'test-site-1'") suite.Equal("test-link-1", findNet.Links[0].Name, "Link Name should be 'test-link-1'") - findSite := models.Site{ID: 1} + findSite := models.Site{Name: "test-site-1"} suite.NoError(db.GetSite(&findSite)) // GetSite assertions - suite.Equal("test-site-1", findSite.FriendlyName, "Site FriendlyName should be 'test-site-1'") + suite.Equal("test-site-1", findSite.Name, "Site Name should be 'test-site-1'") missingSite := models.Site{ID: 3} err = db.GetSite(&missingSite) diff --git a/internal/server/docs/docs.go b/internal/server/docs/docs.go index e3f31ab..79d6df8 100644 --- a/internal/server/docs/docs.go +++ b/internal/server/docs/docs.go @@ -292,7 +292,7 @@ var doc = `{ "models.Site": { "type": "object", "properties": { - "friendlyName": { + "Name": { "type": "string" }, "icon": { diff --git a/internal/server/docs/swagger.json b/internal/server/docs/swagger.json index 1a4940f..a772e36 100644 --- a/internal/server/docs/swagger.json +++ b/internal/server/docs/swagger.json @@ -274,7 +274,7 @@ "models.Site": { "type": "object", "properties": { - "friendlyName": { + "Name": { "type": "string" }, "icon": { diff --git a/internal/server/docs/swagger.yaml b/internal/server/docs/swagger.yaml index 9002db7..1b0713f 100644 --- a/internal/server/docs/swagger.yaml +++ b/internal/server/docs/swagger.yaml @@ -49,7 +49,7 @@ definitions: type: object models.Site: properties: - friendlyName: + Name: type: string icon: type: string diff --git a/internal/server/server_test.go b/internal/server/server_test.go index 60e1559..82ea21d 100644 --- a/internal/server/server_test.go +++ b/internal/server/server_test.go @@ -53,7 +53,7 @@ func (suite ServerSuite) TestNew() { "POST /api/network", "GET /api/healthz", "GET /api/appconfig", - "GET /api/status/:id", + "GET /api/status/:name", "GET /swagger/doc.json", }}, { @@ -66,7 +66,7 @@ func (suite ServerSuite) TestNew() { "POST /api/network", "GET /api/healthz", "GET /api/appconfig", - "GET /api/status/:id", + "GET /api/status/:name", "GET /swagger/*", }}, } diff --git a/internal/yamlstore/yamlstore.go b/internal/yamlstore/yamlstore.go index 3d155ae..72179a3 100644 --- a/internal/yamlstore/yamlstore.go +++ b/internal/yamlstore/yamlstore.go @@ -22,13 +22,6 @@ func New(filepath string) (store.Store, error) { } func (d *YamlStore) CreateNetwork(net *models.Network) error { - net.ID = 1 - for i := range net.Sites { - net.Sites[i].ID = uint(i + 1) - } - for i := range net.Links { - net.Links[i].ID = uint(i + 1) - } b, err := yaml.Marshal(net) if err != nil { return err @@ -51,13 +44,15 @@ func (d *YamlStore) GetNetwork(net *models.Network) error { func (d *YamlStore) GetSite(site *models.Site) error { net := models.Network{} - d.GetNetwork(&net) + err := d.GetNetwork(&net) + if err != nil { + return err + } found := false for _, s := range net.Sites { - if site.ID == s.ID { - site.ID = s.ID - site.FriendlyName = s.FriendlyName + if site.Name == s.Name { + site.Name = s.Name site.CreatedAt = s.CreatedAt site.Icon = s.Icon site.IsSupportedApp = s.IsSupportedApp diff --git a/internal/yamlstore/yamlstore_test.go b/internal/yamlstore/yamlstore_test.go index 0bb9b34..3755114 100644 --- a/internal/yamlstore/yamlstore_test.go +++ b/internal/yamlstore/yamlstore_test.go @@ -41,29 +41,41 @@ func (suite *YamlStoreSuite) TestFunctions() { {Name: "test-link-2"}, }, Sites: []models.Site{ - {FriendlyName: "test-site-1"}, - {FriendlyName: "test-site-2"}, + { + Name: "test-site-1", + Tags: []models.Tag{ + {Value: "tag-1"}, + }, + }, + { + Name: "test-site-2", + Tags: []models.Tag{ + {Value: "tag-2"}, + }, + }, }, } suite.NoError(f.CreateNetwork(&net)) // CreateNetwork assertions - suite.Equal(uint(1), net.ID, "Network ID should be '1'") - suite.Equal(uint(1), net.Sites[0].ID, "Site ID should be '1'") - suite.Equal(uint(2), net.Sites[1].ID, "Site ID should be '2'") - suite.Equal(uint(1), net.Links[0].ID, "Link ID should be '1'") - suite.Equal(uint(2), net.Links[1].ID, "Link ID should be '2'") + suite.Equal("test", net.Network, "Network should be 'test'") + suite.Equal("test-site-1", net.Sites[0].Name, "Site Name should be 'test-site-1'") + suite.Equal("test-site-2", net.Sites[1].Name, "Site Name should be 'test-site-2'") + suite.Equal("test-link-1", net.Links[0].Name, "Link Name should be 'test-link-1'") + suite.Equal("test-link-2", net.Links[1].Name, "Link Name should be 'test-link-2'") + suite.Equal("tag-1", net.Sites[0].Tags[0].Value, "Tag Value should be 'tag-1'") + suite.Equal("tag-2", net.Sites[1].Tags[0].Value, "Tag Value should be 'tag-2'") findNet := models.Network{ID: 1} suite.NoError(f.GetNetwork(&findNet)) // GetNetwork assertions suite.Equal("test", findNet.Network, "Network should be 'test'") - suite.Equal("test-site-1", findNet.Sites[0].FriendlyName, "Site FriendlyName should be 'test-site-1'") + suite.Equal("test-site-1", findNet.Sites[0].Name, "Site Name should be 'test-site-1'") suite.Equal("test-link-1", findNet.Links[0].Name, "Link Name should be 'test-link-1'") - findSite := models.Site{ID: 1} + findSite := models.Site{Name: "test-site-1"} suite.NoError(f.GetSite(&findSite)) // GetSite assertions - suite.Equal("test-site-1", findSite.FriendlyName, "Site FriendlyName should be 'test-site-1'") + suite.Equal("test-site-1", findSite.Name, "Site Name should be 'test-site-1'") missingSite := models.Site{ID: 3} err = f.GetSite(&missingSite) diff --git a/pkg/handlers/network.go b/pkg/handlers/network.go index 5aa8515..3cc10e0 100644 --- a/pkg/handlers/network.go +++ b/pkg/handlers/network.go @@ -27,7 +27,7 @@ type NetworkHandler struct { func (c *NetworkHandler) Create(ctx echo.Context) error { net := new(models.Network) - if err := ctx.Bind(net); err != nil || (net.Network == "" && net.ID == 0 && net.Links == nil && net.Sites == nil) { + if err := ctx.Bind(net); err != nil || (net.Network == "" && net.Links == nil && net.Sites == nil) { if err == nil { err = errors.New("empty request recieved") } diff --git a/pkg/handlers/network_test.go b/pkg/handlers/network_test.go index 7dcc748..f7feb68 100644 --- a/pkg/handlers/network_test.go +++ b/pkg/handlers/network_test.go @@ -73,8 +73,8 @@ func (suite *NetworkSuite) TestGet() { network: models.Network{ Network: "test-network", Sites: []models.Site{ - {ID: 1, FriendlyName: "z"}, - {ID: 2, FriendlyName: "a"}, + {ID: 1, Name: "z"}, + {ID: 2, Name: "a"}, }, }, err: nil, @@ -113,10 +113,8 @@ func (suite *NetworkSuite) TestGet() { if suite.NoError(dec.Decode(&net)) { suite.Equal("test-network", net.Network, "Get Network should return 'test-network'") suite.Len(net.Sites, 2, "There should be 2 sites") - suite.Equal("z", net.Sites[0].FriendlyName, "The first site in the list should have FriendlyName 'z'") - suite.Equal(uint(1), net.Sites[0].ID, "The first site in the list should be ID '1'") - suite.Equal("a", net.Sites[1].FriendlyName, "The second site in the list should have FriendlyName 'a'") - suite.Equal(uint(2), net.Sites[1].ID, "The second site in the list should have ID '2'") + suite.Equal("z", net.Sites[0].Name, "The first site in the list should have Name 'z'") + suite.Equal("a", net.Sites[1].Name, "The second site in the list should have Name 'a'") } } } diff --git a/pkg/handlers/route.go b/pkg/handlers/route.go index 2467f69..a8a95ce 100644 --- a/pkg/handlers/route.go +++ b/pkg/handlers/route.go @@ -14,7 +14,7 @@ func RegisterRoutes(e *echo.Echo, prv *providers.Provider) { e.POST("/api/network", netHandler.Create) statusHandler := &StatusHandler{prv.Status} - e.GET("/api/status/:id", statusHandler.Get) + e.GET("/api/status/:name", statusHandler.Get) cfgHandler := &ConfigHandler{prv.Config} e.GET("/api/appconfig", cfgHandler.Get) diff --git a/pkg/handlers/route_test.go b/pkg/handlers/route_test.go index 6fa88f2..e0cddc4 100644 --- a/pkg/handlers/route_test.go +++ b/pkg/handlers/route_test.go @@ -31,7 +31,7 @@ func (suite RouteSuite) TestRegisterRoutes() { suite.Contains(e, "POST /api/network") suite.Contains(e, "GET /api/healthz") suite.Contains(e, "GET /api/appconfig") - suite.Contains(e, "GET /api/status/:id") + suite.Contains(e, "GET /api/status/:name") } func TestRouteSuite(t *testing.T) { diff --git a/pkg/handlers/status.go b/pkg/handlers/status.go index 7c86513..81c1022 100644 --- a/pkg/handlers/status.go +++ b/pkg/handlers/status.go @@ -3,7 +3,6 @@ package handlers import ( "errors" "net/http" - "strconv" "github.com/eiladin/go-simple-startpage/pkg/usecases/status" "github.com/labstack/echo/v4" @@ -24,18 +23,15 @@ type StatusHandler struct { // @Failure 400 {object} httperror.HTTPError // @Failure 404 {object} httperror.HTTPError // @Failure 500 {object} httperror.HTTPError -// @Router /api/status/{id} [get] +// @Router /api/status/{name} [get] func (c *StatusHandler) Get(ctx echo.Context) error { // httpClient.Timeout = time.Millisecond * time.Duration(c.config.Timeout) - id, err := strconv.Atoi(ctx.Param("id")) - if err != nil || id < 1 { - if err == nil { - err = errors.New("invalid id received: " + ctx.Param("id")) - } - return echo.ErrBadRequest.SetInternal(err) + name := ctx.Param("name") + if name == "" { + return echo.ErrBadRequest } - s, err := c.StatusUseCase.Get(uint(id)) + s, err := c.StatusUseCase.Get(name) if err != nil { if errors.Is(err, status.ErrNotFound) { return echo.ErrNotFound diff --git a/pkg/handlers/status_test.go b/pkg/handlers/status_test.go index 85f137d..0da52e7 100644 --- a/pkg/handlers/status_test.go +++ b/pkg/handlers/status_test.go @@ -18,8 +18,8 @@ type mockStatusUseCase struct { mock.Mock } -func (m *mockStatusUseCase) Get(id uint) (*models.Status, error) { - args := m.Called(id) +func (m *mockStatusUseCase) Get(name string) (*models.Status, error) { + args := m.Called(name) data := args.Get(0).(models.Status) return &data, args.Error(1) } @@ -39,32 +39,30 @@ func (suite *StatusSuite) TestGet() { throwErr error wantErr error }{ - {id: 1, param: "1", uri: "https://my.test.site", isUp: true, throwErr: nil, wantErr: nil}, - {id: 1, param: "1", uri: "https://my.fail.site", isUp: false, throwErr: nil, wantErr: nil}, - {id: 1, param: "1", uri: "https://^^invalidurl^^", isUp: false, throwErr: nil, wantErr: nil}, - {id: 1, param: "1", uri: "ssh://localhost:22224", isUp: true, throwErr: nil, wantErr: nil}, - {id: 1, param: "1", uri: "ssh://localhost:1234", isUp: false, throwErr: nil, wantErr: nil}, - {id: 1, param: "1", uri: "https://500.test.site", isUp: false, throwErr: nil, wantErr: nil}, - {id: 1, param: "abc", uri: "https://400.test.site", isUp: false, throwErr: errors.New("bad request"), wantErr: echo.ErrBadRequest}, + {id: 1, param: "test-site-1", uri: "https://my.test.site", isUp: true, throwErr: nil, wantErr: nil}, + {id: 1, param: "test-site-2", uri: "https://my.fail.site", isUp: false, throwErr: nil, wantErr: nil}, + {id: 1, param: "test-site-3", uri: "https://^^invalidurl^^", isUp: false, throwErr: nil, wantErr: nil}, + {id: 1, param: "test-site-4", uri: "ssh://localhost:22224", isUp: true, throwErr: nil, wantErr: nil}, + {id: 1, param: "test-site-5", uri: "ssh://localhost:1234", isUp: false, throwErr: nil, wantErr: nil}, + {id: 1, param: "test-site-6", uri: "https://500.test.site", isUp: false, throwErr: nil, wantErr: nil}, {id: 1, param: "", uri: "https://no-id.test.site", isUp: false, throwErr: errors.New("bad request"), wantErr: echo.ErrBadRequest}, - {id: 12345, param: "12345", uri: "https://bigid.test.site", isUp: false, throwErr: status.ErrNotFound, wantErr: echo.ErrNotFound}, - {id: 1, param: "1", uri: "https://error.test.site", isUp: false, throwErr: errors.New("internal server error"), wantErr: echo.ErrInternalServerError}, - {id: 1, param: "0", uri: "https://my.test.site", isUp: false, throwErr: errors.New("bad request"), wantErr: echo.ErrBadRequest}, - {id: 1, param: "1", uri: "https://timeout.test.site", isUp: false, throwErr: nil, wantErr: nil}, + {id: 12345, param: "test-site-9", uri: "https://bigid.test.site", isUp: false, throwErr: status.ErrNotFound, wantErr: echo.ErrNotFound}, + {id: 1, param: "test-site-10", uri: "https://error.test.site", isUp: false, throwErr: errors.New("internal server error"), wantErr: echo.ErrInternalServerError}, + {id: 1, param: "tste-site-11", uri: "https://timeout.test.site", isUp: false, throwErr: nil, wantErr: nil}, } for _, c := range cases { uc := new(mockStatusUseCase) if !errors.Is(c.wantErr, echo.ErrBadRequest) { - uc.On("Get", c.id).Return(models.Status{IsUp: c.isUp}, c.throwErr) + uc.On("Get", c.param).Return(models.Status{IsUp: c.isUp}, c.throwErr) } ss := StatusHandler{StatusUseCase: uc} req := httptest.NewRequest("GET", "/", nil) rec := httptest.NewRecorder() ctx := app.NewContext(req, rec) - ctx.SetPath("/:id") - ctx.SetParamNames("id") + ctx.SetPath("/:name") + ctx.SetParamNames("name") ctx.SetParamValues(c.param) err := ss.Get(ctx) uc.AssertExpectations(suite.T()) diff --git a/pkg/models/network.go b/pkg/models/network.go index 3f395d6..65f9f16 100644 --- a/pkg/models/network.go +++ b/pkg/models/network.go @@ -17,7 +17,7 @@ type Network struct { } type NetworkID struct { - ID uint `json:"id" yaml:"id"` + ID uint `json:"id" yaml:"-"` } type Link struct { @@ -31,12 +31,12 @@ type Link struct { } type Site struct { - ID uint `json:"id" gorm:"primaryKey" yaml:"id"` + ID uint `json:"-" gorm:"primaryKey" yaml:"-"` CreatedAt time.Time `json:"-" yaml:"-"` UpdatedAt time.Time `json:"-" yaml:"-"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index" yaml:"-"` NetworkID uint `json:"-" yaml:"-"` - FriendlyName string `json:"friendlyName" yaml:"friendlyName"` + Name string `json:"name" yaml:"name"` URI string `json:"uri" yaml:"uri"` Icon string `json:"icon" yaml:"icon"` IsSupportedApp bool `json:"isSupportedApp" yaml:"isSupportedApp"` diff --git a/pkg/models/status.go b/pkg/models/status.go index 4fa3c21..6251bb4 100644 --- a/pkg/models/status.go +++ b/pkg/models/status.go @@ -10,14 +10,14 @@ import ( ) type Status struct { - ID uint `json:"id"` + Name string `json:"name"` IsUp bool `json:"isUp"` IP string `json:"ip"` } func NewStatus(timeout int, s *Site) Status { res := Status{ - ID: s.ID, + Name: s.Name, IsUp: false, } url, err := url.Parse(s.URI) diff --git a/pkg/usecases/network/network.go b/pkg/usecases/network/network.go index a80535f..04e6218 100644 --- a/pkg/usecases/network/network.go +++ b/pkg/usecases/network/network.go @@ -43,7 +43,7 @@ func (c *service) Create(net *models.Network) error { func sortSitesByName(sites []models.Site) { sort.Slice(sites, func(p, q int) bool { - return sites[p].FriendlyName < sites[q].FriendlyName + return sites[p].Name < sites[q].Name }) } diff --git a/pkg/usecases/network/network_test.go b/pkg/usecases/network/network_test.go index fb7969b..25d93a1 100644 --- a/pkg/usecases/network/network_test.go +++ b/pkg/usecases/network/network_test.go @@ -86,16 +86,16 @@ func (suite *NetworkSuite) TestGet() { func (suite NetworkSuite) TestSortSitesByName() { sites := []models.Site{ - {ID: 1, FriendlyName: "z"}, - {ID: 2, FriendlyName: "a"}, + {ID: 1, Name: "z"}, + {ID: 2, Name: "a"}, } sortSitesByName(sites) suite.Equal(uint(2), sites[0].ID) - suite.Equal("a", sites[0].FriendlyName) + suite.Equal("a", sites[0].Name) suite.Equal(uint(1), sites[1].ID) - suite.Equal("z", sites[1].FriendlyName) + suite.Equal("z", sites[1].Name) } func TestNetworkSuite(t *testing.T) { diff --git a/pkg/usecases/status/status.go b/pkg/usecases/status/status.go index 94159fc..e7bdb62 100644 --- a/pkg/usecases/status/status.go +++ b/pkg/usecases/status/status.go @@ -12,7 +12,7 @@ var ( ) type IStatus interface { - Get(uint) (*models.Status, error) + Get(string) (*models.Status, error) } type repository interface { @@ -34,8 +34,8 @@ func New(repo repository, cfg *config.Config) IStatus { } } -func (c *service) Get(id uint) (*models.Status, error) { - site := models.Site{ID: id} +func (c *service) Get(name string) (*models.Status, error) { + site := models.Site{Name: name} if err := c.repo.GetSite(&site); err != nil { return nil, ErrNotFound diff --git a/pkg/usecases/status/status_test.go b/pkg/usecases/status/status_test.go index b089af6..9f5a631 100644 --- a/pkg/usecases/status/status_test.go +++ b/pkg/usecases/status/status_test.go @@ -29,20 +29,20 @@ func (suite *StatusSuite) TestNew() { func (suite *StatusSuite) TestGet() { cases := []struct { - id uint + name string wantErr error }{ - {id: 1, wantErr: nil}, - {id: 2, wantErr: ErrNotFound}, + {name: "test-site-1", wantErr: nil}, + {name: "test-site-2", wantErr: ErrNotFound}, } for _, c := range cases { cfg := &config.Config{Timeout: 100} r := new(mockRepo) - r.On("GetSite", &models.Site{ID: c.id}).Return(c.wantErr) + r.On("GetSite", &models.Site{Name: c.name}).Return(c.wantErr) ss := service{repo: r, config: cfg} - status, err := ss.Get(c.id) + status, err := ss.Get(c.name) r.AssertExpectations(suite.T()) if c.wantErr != nil { suite.EqualError(err, c.wantErr.Error()) diff --git a/ui/src/app/config/config-site/config-site.component.html b/ui/src/app/config/config-site/config-site.component.html index c6c5abc..79bff5e 100644 --- a/ui/src/app/config/config-site/config-site.component.html +++ b/ui/src/app/config/config-site/config-site.component.html @@ -1,6 +1,6 @@
- + diff --git a/ui/src/app/config/config/config.component.html b/ui/src/app/config/config/config.component.html index ee397f5..002a6b5 100644 --- a/ui/src/app/config/config/config.component.html +++ b/ui/src/app/config/config/config.component.html @@ -50,7 +50,7 @@

Sites

- {{site.friendlyName || 'Unknown'}} + {{site.name || 'Unknown'}} diff --git a/ui/src/app/config/services/config.service.ts b/ui/src/app/config/services/config.service.ts index d20d097..14be8ec 100644 --- a/ui/src/app/config/services/config.service.ts +++ b/ui/src/app/config/services/config.service.ts @@ -22,8 +22,8 @@ export class ConfigService { public save(config: Config): Observable { const alphaSort = config.sites.sort((a, b) => { - if (a.friendlyName > b.friendlyName) { return 1; } - if (b.friendlyName < a.friendlyName) { return -1; } + if (a.name > b.name) { return 1; } + if (b.name < a.name) { return -1; } return 0; }); diff --git a/ui/src/app/dashboard/site-card-xs/site-card-xs.component.html b/ui/src/app/dashboard/site-card-xs/site-card-xs.component.html index 06d9a03..d010428 100644 --- a/ui/src/app/dashboard/site-card-xs/site-card-xs.component.html +++ b/ui/src/app/dashboard/site-card-xs/site-card-xs.component.html @@ -2,6 +2,6 @@
-

{{site.friendlyName}}

+

{{site.name | uppercase}}

{{site.ip}}

\ No newline at end of file diff --git a/ui/src/app/dashboard/site-card/site-card.component.html b/ui/src/app/dashboard/site-card/site-card.component.html index 8c90ae2..5bf8910 100644 --- a/ui/src/app/dashboard/site-card/site-card.component.html +++ b/ui/src/app/dashboard/site-card/site-card.component.html @@ -5,7 +5,7 @@
-
{{site.friendlyName | uppercase}}
+
{{site.name | uppercase}}
{{site.ip}}