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

Promtail targets page #532

Merged
merged 8 commits into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add service discovery template
  • Loading branch information
cyriltovena committed May 6, 2019
commit 7b093a5ab0b8b013124c0eb5463ddff292ece093
11 changes: 5 additions & 6 deletions pkg/logproto/logproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions pkg/promtail/server/ui/assets_vfsdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,16 @@ var Assets = func() http.FileSystem {
"/templates/_base.html": &vfsgen۰CompressedFileInfo{
name: "_base.html",
modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC),
uncompressedSize: 2650,
uncompressedSize: 2784,

compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x56\x61\x6f\xdb\x36\x10\xfd\x9e\x5f\xc1\x72\x03\x9a\x00\xa3\x88\x22\xfd\x30\xac\x92\x86\xad\xcd\xd0\x00\xc3\x1a\x74\x5e\xb1\x61\x18\x82\x93\x44\x49\x4c\x28\x92\x25\x4f\x9a\x0d\xc3\xff\x7d\xa0\xe9\xc4\x96\x6c\xb5\x41\xb1\xcd\x5f\x24\x92\xf7\xee\x1d\xef\x9e\x1f\x94\x3e\x7b\xf3\xee\xf5\xe2\x8f\x9b\x2b\xd2\x62\xa7\xf2\xb3\x34\x3c\x88\x02\xdd\x64\x54\x68\x9a\x9f\x11\x42\x48\xda\x0a\xa8\xe2\xeb\x76\xd9\x09\x04\xd2\x22\x5a\x26\x3e\xf6\x72\xc8\xe8\x6b\xa3\x51\x68\x64\x8b\x95\x15\x94\x94\x71\x95\x51\x14\x4b\xe4\x21\xe1\x2b\x52\xb6\xe0\xbc\xc0\xac\xc7\x9a\x7d\x4b\xa7\xb9\x34\x74\x22\xa3\xce\x14\x06\xfd\x01\x5e\x1b\xa9\x2b\xb1\xfc\x46\x9b\xda\x28\x65\xfe\x3e\xc4\xa1\x44\x25\xf2\xf5\x9a\x58\x68\xc4\x22\x2c\xc8\x66\x93\xf2\xb8\xbd\x0f\x53\x52\xdf\x13\x27\x54\x46\x7d\x6b\x1c\x96\x3d\x12\x59\x1a\x4d\x49\xeb\x44\x9d\xd1\x2d\x1e\xdb\x1b\x27\x6a\xb9\x24\x9b\x0d\xf7\x08\x28\x4b\x2e\xbb\x86\xd7\x30\x84\xd0\x44\x96\xe6\xfb\x21\x5b\xaf\x49\xd1\x4b\x55\x7d\x10\xce\x4b\xa3\xc9\x66\x73\x58\x8d\x2f\x9d\xb4\x48\xbc\x2b\xe7\x73\x0e\x42\x57\xc6\xf1\x3b\xcf\xef\x3e\xf6\xc2\xad\xd8\x65\x72\x99\xbc\x48\x3a\xa9\x93\x3b\x3f\xc3\x90\xf2\x98\x39\x0f\x2c\x5f\x4a\x67\x8d\xb5\xc2\x3d\x91\xe8\x8b\x48\x0a\x63\xd0\xa3\x03\xcb\x5e\x26\x2f\x92\xcb\x40\xfa\xb8\xf5\x54\xde\xc9\xcc\x70\x65\xc5\x4e\x41\xa5\xf7\x74\x37\x43\x5c\x29\xe1\x5b\x21\xf0\x73\x03\x9c\x29\xac\xf4\xd3\xca\x4a\x3f\x57\xda\xbf\x5b\x50\x60\xb6\xce\x74\x08\x52\xfd\x6f\xa4\xd3\x2e\xbc\x64\x8d\x5a\xd9\x36\xc8\xda\x8f\x7b\x71\x70\xf0\xb9\xb6\x4c\x15\xb2\xaf\x39\xfc\x06\x70\xe4\xe6\x87\xc5\xdb\xdb\x9b\xf7\x57\x3f\x5d\xff\x4e\x32\x72\x54\x1d\x7d\x75\x84\xf8\xf1\xb7\xeb\x9f\xdf\xdc\x7e\xb8\x7a\xff\xeb\xf5\xbb\x5f\x76\x98\x29\xf3\x18\xf5\xf5\x79\xdd\xeb\x12\xc3\xd9\xf9\x05\x59\x8f\xce\xe2\xf9\xf3\x3f\x2b\x40\x60\x68\x9a\x46\x85\x26\x1a\xa3\x50\x5a\xfa\xd7\xf3\x8b\x64\xf7\x7e\x7e\x31\x82\x6d\xf6\xcb\x13\xb2\x5c\xaf\x51\x74\x56\x01\x0a\x42\x83\x1f\x52\x92\x6c\x36\xd1\x1e\x79\xf4\xc7\xb8\x28\x4c\xb5\x3a\x18\xa3\x86\x81\x94\x0a\xbc\xcf\xa8\x86\xa1\x00\x47\x6a\xb9\x14\x15\x43\x63\x49\xdc\x60\x62\x69\x41\x57\xcc\x77\x0f\x1b\x15\xb8\x7b\x52\x34\xdb\x27\x1d\xb7\x37\xad\xe4\x63\xbe\xe0\x93\x20\xb5\x70\xac\x56\xbd\xac\x68\x1e\x43\xce\x8e\x7a\x91\x16\x3d\xa2\xd1\x3b\x35\xc5\x05\x1d\x57\xb5\x6b\x93\xa3\x64\xd4\xb4\xd2\x28\x05\xd6\x8b\x87\x6d\x70\x8d\xc0\x8c\x7e\xa5\x61\x60\x3b\x9b\xa6\x04\x9c\x84\xdd\x25\x44\x95\xd1\x1a\x54\x00\x6c\x77\x43\x8c\x33\x2a\xd2\x4c\x10\x0a\x8a\xa0\xe6\xc5\x96\x2a\x5c\x5d\x36\x10\xe6\x39\xb9\xf1\x5e\x6d\x16\xf4\xe9\xa2\xd9\xd6\xd2\x83\x97\x58\xd0\x33\xe8\x67\x8c\x1d\x26\xf0\x8e\x19\xad\x56\x34\x3f\xa2\xff\x54\x96\xa3\x3a\x02\x31\x2b\xc0\x7d\x9a\xfc\xbf\x82\x31\x76\x0c\x4c\x79\x9c\x6f\x7e\x42\x06\x30\x69\x5f\xe1\x40\x57\xb3\x1e\x42\xf3\x9b\x9d\x5f\xa5\x1c\xf2\xb3\x13\xf9\x82\x16\x65\x35\x99\xed\x98\xe2\x41\x40\xe4\x51\x49\x33\xf3\xe9\xd5\x04\xa9\x61\x98\x89\x25\xd1\x1e\x0f\xe2\x99\x44\xd1\xd1\x7c\x74\x41\x16\x0c\x74\xf6\x72\x51\xc9\x9e\xe6\x8b\xf8\x12\xae\x98\x72\x25\x9f\xc2\x48\xf6\x94\x64\x3e\xfe\xb0\xe3\xe4\xb8\xa2\xf0\xf9\xe4\xbf\xe3\xbc\x91\xd8\xf6\x45\x52\x9a\x8e\x37\x0e\x6a\xd0\xc0\x95\xb9\x97\x94\x3c\xfc\xd7\x6e\x0b\x05\xfa\x9e\xe6\x6f\x85\xb2\xdb\x41\xcc\x92\xcd\x96\x9f\xf2\x5e\x9d\x52\x4a\x25\x87\x89\xbb\x8c\xb7\x52\xae\x61\x98\xb1\xc0\xc7\x79\xef\x5d\x30\x3a\x5f\xca\xe3\x97\xe4\x3f\x01\x00\x00\xff\xff\x3c\x13\x2d\x58\x5a\x0a\x00\x00"),
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x56\x61\x6f\xdb\x36\x10\xfd\x9e\x5f\xc1\x72\x03\x9a\x00\xa3\x88\x22\xfd\x30\xac\x92\x86\xad\xc9\xd0\x00\xc3\x1a\xb4\x5e\xb1\x61\x18\x82\x93\x44\x49\x4c\x28\x92\x25\x4f\x5a\x0c\xc3\xff\x7d\xa0\xe9\xc4\x96\x6c\xb5\x5d\xb1\xd6\x5f\x2c\x1e\x79\xf7\x1e\xef\x9e\x1e\x94\x3e\xb9\x78\xfd\x72\xf1\xe7\xf5\x25\x69\xb1\x53\xf9\x49\x1a\xfe\x88\x02\xdd\x64\x54\x68\x9a\x9f\x10\x42\x48\xda\x0a\xa8\xe2\xe3\x66\xd9\x09\x04\xd2\x22\x5a\x26\xde\xf7\x72\xc8\xe8\x4b\xa3\x51\x68\x64\x8b\xa5\x15\x94\x94\x71\x95\x51\x14\xf7\xc8\x43\xc1\x17\xa4\x6c\xc1\x79\x81\x59\x8f\x35\xfb\x9e\x4e\x6b\x69\xe8\x44\x46\x9d\x29\x0c\xfa\xbd\x7c\x6d\xa4\xae\xc4\xfd\x77\xda\xd4\x46\x29\xf3\xcf\x7e\x1e\x4a\x54\x22\x5f\xad\x88\x85\x46\x2c\xc2\x82\xac\xd7\x29\x8f\xe1\xdd\x31\x25\xf5\x1d\x71\x42\x65\xd4\xb7\xc6\x61\xd9\x23\x91\xa5\xd1\x94\xb4\x4e\xd4\x19\xdd\xe4\x63\x7b\xed\x44\x2d\xef\xc9\x7a\xcd\x3d\x02\xca\x92\xcb\xae\xe1\x35\x0c\xe1\x68\x22\x4b\xf3\xe3\x90\xad\x56\xa4\xe8\xa5\xaa\xde\x09\xe7\xa5\xd1\x64\xbd\xde\x67\xe3\x4b\x27\x2d\x12\xef\xca\xf9\x9a\x83\xd0\x95\x71\xfc\xd6\xf3\xdb\xf7\xbd\x70\x4b\x76\x9e\x9c\x27\xcf\x92\x4e\xea\xe4\xd6\xcf\x20\xa4\x3c\x56\xce\x03\xca\xe7\xc2\x59\x63\xad\x70\x9f\x08\xf4\x59\x20\x85\x31\xe8\xd1\x81\x65\xcf\x93\x67\xc9\x79\x00\x7d\x0c\x7d\x2a\xee\x64\x66\xb8\xb4\x62\xab\xa0\xd2\x7b\xba\x9d\x21\x2e\x95\xf0\xad\x10\xf8\xb1\x01\xce\x10\x2b\xfd\x94\x59\xe9\xe7\xa8\xfd\xbf\x84\x02\xb2\x75\xa6\x43\x90\xea\xab\x81\x4e\xbb\xf0\x9c\x35\x6a\x69\xdb\x20\x6b\x3f\xee\xc5\xde\xc6\xc7\xda\x32\x55\xc8\x8e\x73\xf8\x0d\xe0\xc8\xf5\x4f\x8b\x57\x37\xd7\x6f\x2e\x7f\xb9\xfa\x83\x64\xe4\x80\x1d\x7d\x71\x90\xf1\xf3\xef\x57\xbf\x5e\xdc\xbc\xbb\x7c\xf3\xf6\xea\xf5\x6f\xdb\x9c\x29\xf2\x38\xeb\xdb\xd3\xba\xd7\x25\x86\xbd\xd3\x33\xb2\x1a\xed\xc5\xfd\xa7\x7f\x55\x80\xc0\xd0\x34\x8d\x0a\x4d\x34\x46\xa1\xb4\xf4\xef\xa7\x67\xc9\xf6\xf9\xf4\x6c\x94\xb6\xde\x2d\x8f\xc8\x72\xb5\x42\xd1\x59\x05\x28\x08\x0d\x7e\x48\x49\xb2\x5e\x47\x7b\xe4\xd1\x1f\xe3\xa2\x30\xd5\x72\x6f\x8c\x1a\x06\x52\x2a\xf0\x3e\xa3\x1a\x86\x02\x1c\xa9\xe5\xbd\xa8\x18\x1a\x4b\x62\x80\x89\x7b\x0b\xba\x62\xbe\x7b\x08\x54\xe0\xee\x48\xd1\x6c\xfe\xe9\xb8\xbd\x69\x25\x1f\xeb\x05\x9f\x04\xa9\x85\x63\xb5\xea\x65\x45\xf3\x78\xe4\xe4\xa0\x17\x69\xd1\x23\x1a\xbd\x55\x53\x5c\xd0\x31\xab\x6d\x9b\x1c\x25\xa3\xa6\x95\x46\x29\xb0\x5e\x3c\x84\xc1\x35\x02\x33\xfa\x8d\x86\x81\x6d\x6d\x9a\x12\x70\x12\xb6\x97\x10\x55\x46\x6b\x50\x21\x61\x13\x0d\x67\x9c\x51\x11\x66\x92\xa1\xa0\x08\x6a\x5e\x6c\xa0\xc2\xd5\x65\x03\x61\x9e\x93\x1b\xef\xd4\x66\x41\x1f\x27\xcd\x36\x96\x1e\xbc\xc4\x82\x9e\xc9\x7e\xc2\xd8\x7e\x01\xef\x98\xd1\x6a\x49\xf3\x03\xf8\x0f\x55\x39\xe0\x11\x80\x59\x01\xee\xc3\xe0\x5f\x2a\x8d\xb1\xc3\xc4\x94\xc7\xf9\xe6\x47\x64\x00\x93\xf6\x15\x0e\x74\x35\xeb\x21\x34\xbf\xde\xfa\x55\xca\x21\x3f\x39\x52\x2f\x68\x51\x56\x93\xd9\x8e\x21\x1e\x04\x44\x1e\x95\x34\x33\x9f\x5e\x4d\x32\x35\x0c\x33\x67\x49\xb4\xc7\xbd\xf3\x4c\xa2\xe8\x68\x3e\xba\x20\x0b\x06\x3a\x6f\x90\xc2\x0d\xb2\x14\xac\x92\xbe\x34\x83\x70\x4b\x9a\xbf\x8d\x21\x72\xf1\x10\x0a\xd7\x4e\xb9\x92\x5f\x8e\x45\x7c\x9f\x3c\xcd\x17\xf1\xe1\xbf\x20\x92\x1d\x24\x99\x3f\xbf\x3f\x77\x72\xc8\x28\x7c\xc4\xf9\x1f\x38\x6f\x24\xb6\x7d\x91\x94\xa6\xe3\x8d\x83\x1a\x34\x70\x65\xee\x24\x25\x0f\x6f\xfc\x4d\xa1\x40\xdf\xd1\xfc\x95\x50\x76\x23\x87\x59\xb0\x59\xfa\x29\xef\xd5\x31\xbd\x56\x72\x98\x78\xdc\x38\x94\x72\x0d\xc3\x8c\x11\x3f\xaa\x6e\xe7\xc5\xd1\x7f\x53\x1e\xbf\x67\xff\x0d\x00\x00\xff\xff\xfa\x23\x75\xb9\xe0\x0a\x00\x00"),
},
"/templates/service-discovery.html": &vfsgen۰CompressedFileInfo{
name: "service-discovery.html",
modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC),
uncompressedSize: 2774,

compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x56\x41\x8f\xeb\x34\x10\xbe\xe7\x57\x8c\x4c\x0f\x80\xb6\xcd\xdb\x27\xc1\xa1\xb8\x41\x48\x7b\x41\xe2\x80\xe0\x89\x0b\x42\xc8\x89\xa7\xcd\xec\x73\xed\xc8\x76\xfb\x5a\x45\xf9\xef\xc8\x76\x92\xba\xa5\x7d\x88\xe5\xca\x4a\x5b\xd9\x63\x7b\xe6\x9b\xcf\xdf\x8c\xd3\xf7\x12\xb7\xa4\x11\x58\x8b\x42\xb2\x61\x28\xb8\x22\xfd\x11\xfc\xb9\xc3\x0d\xf3\x78\xf2\x65\xe3\x1c\x03\x8b\x6a\xc3\x9c\x3f\x2b\x74\x2d\xa2\x67\xd0\x5a\xdc\x6e\x58\xdf\x43\x27\x7c\xfb\xb3\xc5\x2d\x9d\x60\x18\x4a\xe7\x85\xa7\x26\x9c\x29\xbd\xb0\x3b\xf4\x6e\xd5\x38\xf7\xfd\x71\xd3\xf7\x50\x1f\x48\xc9\xdf\xd0\x3a\x32\x1a\x86\x81\x55\x05\x77\x8d\xa5\xce\x83\xb3\xcd\x63\x5f\xaf\x17\x57\xaf\x8f\x3c\xf1\x32\x79\xaa\x8a\xbe\x47\x2d\x87\xa1\x28\x78\x44\x5b\x15\x00\x5f\xff\x4e\xf2\x8f\x75\x8d\x5b\x63\x11\xfa\x02\x00\x40\x92\xeb\x94\x38\xaf\xa1\x56\xa6\xf9\xf8\x5d\xb4\x35\x46\x7b\xd4\x7e\x0d\x0c\x58\xb2\xec\x85\xdd\x91\x5e\x7a\xd3\xad\x61\xf9\xed\x37\xdd\x29\x99\x5b\xa4\x5d\xeb\xd7\x70\xb1\x1c\xc9\x51\x4d\x8a\xfc\x79\x0d\x2d\x49\x89\x3a\xd8\x87\x82\x97\x23\x88\xe2\xc2\xf3\x18\x26\x50\x0d\xc0\x25\x1d\xa1\x51\xc2\xb9\x4d\x5c\x10\xa4\xd1\x2e\xb7\xea\x40\x92\x55\x45\xf4\xcd\xdb\xe7\xea\x57\xb4\x47\x6a\x10\x5e\xc8\x35\xe6\x88\xf6\xcc\xcb\xf6\xb9\x4a\xcb\x92\x8e\x69\x04\xc0\x0f\x6a\x1a\x02\xf4\xbd\x15\x7a\x87\xb0\xa0\x27\x58\xbc\x9a\x1a\xd6\x1b\x58\xfd\xa8\x25\x9e\x62\xe4\xe9\x8f\x2b\xaa\xb2\x29\x00\x17\xe3\xdd\x7e\xf1\x6a\xea\x65\xdf\x87\xb3\x81\xe2\x69\xc4\x4b\x51\xc1\x97\x7d\x0f\x14\x7c\xc1\x62\xf5\x43\xe3\xe9\x18\xe2\x84\x3b\xcb\xec\x1f\x8c\x17\x2a\x99\x41\xa4\x3d\xe3\x3d\x7e\x95\xc7\x2f\x73\x00\xd3\xed\x4d\x6b\x53\x42\xbc\x8c\x69\x16\x69\xcf\x62\xf4\x13\x53\xfa\x90\xc6\xe3\xa1\xcf\x66\x3d\x13\x36\x51\xee\x45\xad\x70\x39\x13\xcf\x66\x22\xdb\xf7\xd3\x96\x57\x53\xff\x19\x4a\x03\x2d\x03\x92\x71\x9e\x91\x92\x01\x4f\xa6\xd9\xc0\xeb\x83\xf7\x46\x8f\x85\x94\x26\xec\x12\x37\xe1\x6f\x8c\x52\xa2\x73\x28\x97\x11\x09\xd4\x5e\x87\xff\x65\x67\x69\x2f\xec\x99\x55\xae\x35\x9f\x60\x6f\x2c\xf2\x32\xb9\x98\x11\x96\xed\xfb\x69\xdc\xf7\x9f\xc8\xb7\x33\xef\x2f\xd6\x74\x1d\x4a\x58\xd0\x0c\xa7\xef\x69\x0b\x3b\x0f\x2b\x78\x7e\xf7\x0e\x2e\xfc\x5e\xa9\x6f\x82\x82\x0a\xf7\x41\xa0\x10\xb5\xbb\x61\x53\xad\x68\xa3\xf1\x2a\x63\x58\x85\xab\x9d\x72\x69\xc5\x11\xa1\x46\xd4\x20\x13\x80\x27\x08\xe8\x49\xef\xc0\x68\x75\x06\xdf\x22\x6c\xc9\x3a\x1f\x31\x8c\x7b\xe6\xd3\xc2\x01\x9e\xc4\xbe\x53\xe8\x56\x73\x8a\x99\xb4\xaf\x85\x71\x23\x93\x44\x5e\x7e\xa7\x90\x6e\xd6\xed\xc7\x41\x6d\xac\x44\x1b\xe3\x45\xbb\xb7\xd4\xcd\xb3\x36\x94\xd4\x3f\xa5\xcb\x7d\x50\x41\xae\x0a\x89\x5e\x90\x72\x2c\x2f\x1f\xee\xed\x4d\x35\xf9\xb6\x9a\xaa\x16\x25\xfc\x24\x6a\x54\x8e\x97\xbe\xfd\xfb\xb6\x24\xe4\x07\x5b\x78\x99\x7b\x0e\xab\x28\x64\x8e\xae\x36\xf2\x3c\x16\x48\x5e\x07\xa3\x28\x26\x9a\x6f\x44\x7a\x17\xf0\x9c\xa4\x8a\x48\xd8\xf5\xfa\x28\xf6\xb4\x16\xab\xeb\x92\x5e\x82\x0e\x57\x01\x46\xaf\x07\x35\x7b\x25\xe7\x97\xa4\x15\x69\x9c\x39\x8f\xb6\x38\x5e\x86\x7a\xb9\xe5\x3e\x8f\x3c\x96\x77\x8c\xff\x04\x8b\xa3\x50\x07\x0c\x30\x46\x44\x77\x62\xc3\xbd\x2e\x97\x2d\xb9\x4e\xe8\x09\x5c\x2d\xe4\x0e\x21\xfe\x5e\x8a\x70\x4a\x77\x18\xc2\x23\x95\x42\x0e\x03\xe3\x65\x38\x79\xdf\xed\x75\x57\xcb\xf1\xa3\x72\x78\x17\xe4\x43\x88\x0f\x01\x4a\xdc\x8a\x83\xf2\xac\x0a\x74\x3d\x46\xf3\x19\x2c\x59\x11\xe5\xfb\xf3\x67\x24\x59\xbc\xfc\xaf\x2a\xf9\x5f\x1b\x17\x36\xff\xb5\x36\xde\x06\x72\xd6\xc7\xf8\x22\xac\x43\xcf\x0e\x8d\xf7\x17\x14\xce\x68\x58\xbd\xa4\x0e\x06\xe1\x51\x7f\x13\xde\x37\xea\xe7\xba\x99\xdd\xfa\xe1\xe5\xd8\xcc\xe6\x69\xe8\xd2\x57\xdf\x01\xe9\x18\xa0\x96\x49\x50\xd3\xe7\xc1\xe4\xea\xaf\x00\x00\x00\xff\xff\x92\xdb\x08\x66\xd6\x0a\x00\x00"),
},
"/templates/targets.html": &vfsgen۰CompressedFileInfo{
name: "targets.html",
Expand Down Expand Up @@ -569,6 +576,7 @@ var Assets = func() http.FileSystem {
}
fs["/templates"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
fs["/templates/_base.html"].(os.FileInfo),
fs["/templates/service-discovery.html"].(os.FileInfo),
fs["/templates/targets.html"].(os.FileInfo),
}

Expand Down
1 change: 1 addition & 0 deletions pkg/promtail/server/ui/templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

<div id="nav-content" class="navbar-collapse collapse">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="{{ pathPrefix }}/service-discovery">Service Discovery</a></li>
<li class="nav-item"><a class="nav-link" href="{{ pathPrefix }}/targets">Targets</a></li>
<li class= "nav-item" >
<a class ="nav-link" href="https://github.com/grafana/loki" target="_blank">Help</a>
Expand Down
92 changes: 92 additions & 0 deletions pkg/promtail/server/ui/templates/service-discovery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{{define "head"}}
<link type="text/css" rel="stylesheet" href="{{ pathPrefix }}/static/css/targets.css?v={{ buildVersion }}">
<script src="{{ pathPrefix }}/static/js/targets.js?v={{ buildVersion }}"></script>
{{end}}

<style>
*[id]:before {
display: block;
content: " ";
margin-top: -65px;
height: 65px;
visibility: hidden;
}
</style>

{{define "content"}}
<div class="container-fluid">

<h1>Service Discovery</h1>
<div>
<ul>
{{range $i, $job := .Index}}
<li>
<a href="#job-{{$job}}">{{$job}}</a> ({{ index $.Active $i }}/{{ index $.Total $i }} active targets)
</li>
{{end}}
</ul>
</div>

{{$targets := .Targets}}
{{range $i, $job := .Index}}

<div class="table-container">
<h2 class="job_header" id="job-{{$job}}">
{{$job}}
<button type="button" class="targets collapsed-table btn btn-primary">show more</button>
</h2>
{{with index $.Dropped $i}}
{{if gt . 100 }}
<div class="collapsed-element" style="display:none">
{{ . }} targets have been dropped, showing only the first 100 dropped targets as examples.
</div>
{{end}}
{{end}}
<table class="table table-sm table-bordered table-striped table-hover" style="display:none">
<thead class="job_details">
<tr>
<th>Discovered Labels</th>
<th>Target Labels</th>
</tr>
</thead>
<tbody>

{{range index $targets $job}}
<tr>
<td class="labels">
{{$labels := .DiscoveredLabels }}
<ul class="list-inline" style="list-style-type:none">
{{range $label, $value := $labels}}
<li>
<span class="badge badge-primary">{{$label}}="{{$value}}"</span>
</li>
{{else}}
<li>
<span class="badge badge-default">none</span>
</li>
{{end}}
</ul>
</td>
<td class="labels">
{{$labels := .Labels }}
<ul class="list-inline" style="list-style-type:none">
{{range $label, $value := $labels}}
<li>
<span class="badge badge-primary">{{$label}}="{{$value}}"</span>
</li>
{{else}}
<li>
<span class="badge badge-default">Dropped: {{ dropReason .Details }}</span>
</li>
{{end}}
</ul>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{ end }}
</div>

{{end}}
2 changes: 1 addition & 1 deletion pkg/promtail/targets/filetargetmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (s *targetSyncer) DroppedTargets() []Target {
func (s *targetSyncer) ActiveTargets() []Target {
s.mtx.Lock()
defer s.mtx.Unlock()
actives := make([]Target, len(s.targets))
actives := []Target{}
for _, t := range s.targets {
actives = append(actives, t)
}
Expand Down