From cecdc600b45d8b6a978380b80e2c211a8e17cb00 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Mon, 28 Jun 2021 11:20:25 +0200 Subject: [PATCH 01/27] feat: add ListLineageStats api endpoint and model --- api/api.go | 21 +++++++++++++++++++++ db/db.go | 27 +++++++++++++++++++++++++++ types/search.go | 6 ++++++ 3 files changed, 54 insertions(+) diff --git a/api/api.go b/api/api.go index f5ac7142..ae6b62b0 100644 --- a/api/api.go +++ b/api/api.go @@ -63,6 +63,27 @@ func ListStateStats(w http.ResponseWriter, r *http.Request, d *db.Database) { } } +// ListLineageStats returns Lineage information list +func ListLineageStats(w http.ResponseWriter, r *http.Request, d *db.Database) { + w.Header().Set("Access-Control-Allow-Origin", "*") + query := r.URL.Query() + lineages, page, total := d.ListLineageStats(query) + + // Build response object + response := make(map[string]interface{}) + response["lineages"] = lineages + response["page"] = page + response["total"] = total + j, err := json.Marshal(response) + if err != nil { + JSONError(w, "Failed to marshal lineages", err) + return + } + if _, err := io.WriteString(w, string(j)); err != nil { + log.Error(err.Error()) + } +} + // GetState provides information on a State func GetState(w http.ResponseWriter, r *http.Request, d *db.Database) { params := mux.Vars(r) diff --git a/db/db.go b/db/db.go index e4d2d095..54d76738 100644 --- a/db/db.go +++ b/db/db.go @@ -498,6 +498,33 @@ func (db *Database) ListStateStats(query url.Values) (states []types.StateStat, return } +// ListLineageStats returns a slice of LineageStat, along with paging information +func (db *Database) ListLineageStats(query url.Values) (lineages []types.LineageStat, page int, total int) { + row := db.Table("lineages").Select("count(DISTINCT value)").Row() + if err := row.Scan(&total); err != nil { + log.Error(err.Error()) + } + + offset := 0 + page = 1 + if v := string(query.Get("page")); v != "" { + page, _ = strconv.Atoi(v) // TODO: err + offset = (page - 1) * pageSize + } + + sql := "SELECT lineages.value as lineage_value, count(sts.*) as state_count" + + " FROM (SELECT DISTINCT ON(states.lineage_id) states.id, states.lineage_id FROM states ORDER BY states.lineage_id DESC) t" + + " JOIN lineages ON lineages.id = t.lineage_id" + + " JOIN states sts ON sts.lineage_id = lineages.id" + + " GROUP BY lineages.value" + + " ORDER BY state_count DESC" + + " LIMIT 20" + + " OFFSET ?" + + db.Raw(sql, offset).Find(&lineages) + return +} + // listField is a wrapper utility method to list distinct values in Database tables. func (db *Database) listField(table, field string) (results []string, err error) { rows, err := db.Table(table).Select(fmt.Sprintf("DISTINCT %s", field)).Rows() diff --git a/types/search.go b/types/search.go index 4c515cd9..77a53e4a 100644 --- a/types/search.go +++ b/types/search.go @@ -34,3 +34,9 @@ type StateStat struct { LastModified time.Time `json:"last_modified"` ResourceCount int `json:"resource_count"` } + +// LineageStat stores Lineage stats +type LineageStat struct { + LineageValue string `json:"lineage_value"` + StateCount int `json:"state_count"` +} From b49a536710e3ffa7848906198de12a218180e327 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Mon, 28 Jun 2021 15:42:00 +0200 Subject: [PATCH 02/27] feat: update Terraboard overview to list by lineage --- static/lineage.html | 59 +++++++++++++++++++++++++++++++++++++++++++++ static/main.html | 17 ++----------- 2 files changed, 61 insertions(+), 15 deletions(-) create mode 100644 static/lineage.html diff --git a/static/lineage.html b/static/lineage.html new file mode 100644 index 00000000..1e07c24f --- /dev/null +++ b/static/lineage.html @@ -0,0 +1,59 @@ +
+
+ + +

Resource types

+
+
+ + +

Terraform versions

+
+
+ + +

States locked

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Path + + TF Version + + Serial + + Time + + Resources + + Activity +
{{r.path}}{{r.terraform_version}}{{r.serial}}{{r.last_modified | date:'medium'}}{{r.resource_count}} + +
+
\ No newline at end of file diff --git a/static/main.html b/static/main.html index ccab73b1..96e39091 100644 --- a/static/main.html +++ b/static/main.html @@ -22,24 +22,11 @@

States locked

- - - - - From f33c21c4d2177e445f2f9d2ef7b425163a9b4846 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Tue, 29 Jun 2021 17:19:09 +0200 Subject: [PATCH 03/27] feat: add last modified path on lineage overview --- db/db.go | 5 +++-- static/main.html | 5 ++++- types/search.go | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/db/db.go b/db/db.go index 54d76738..a5dfb466 100644 --- a/db/db.go +++ b/db/db.go @@ -512,11 +512,12 @@ func (db *Database) ListLineageStats(query url.Values) (lineages []types.Lineage offset = (page - 1) * pageSize } - sql := "SELECT lineages.value as lineage_value, count(sts.*) as state_count" + + sql := "SELECT lineages.value as lineage_value, last_st.path as last_path, count(sts.*) as state_count" + " FROM (SELECT DISTINCT ON(states.lineage_id) states.id, states.lineage_id FROM states ORDER BY states.lineage_id DESC) t" + " JOIN lineages ON lineages.id = t.lineage_id" + " JOIN states sts ON sts.lineage_id = lineages.id" + - " GROUP BY lineages.value" + + " JOIN ( SELECT t1.lineage_id, max(t1.path) as path, max(t2.last_modified) as last_modified FROM states t1 JOIN versions t2 ON t2.id = t1.version_id GROUP BY t1.lineage_id) last_st ON last_st.lineage_id = lineages.id" + + " GROUP BY lineages.value, last_st.path" + " ORDER BY state_count DESC" + " LIMIT 20" + " OFFSET ?" diff --git a/static/main.html b/static/main.html index 96e39091..6b264aa5 100644 --- a/static/main.html +++ b/static/main.html @@ -26,7 +26,10 @@

States locked

Lineage
+ diff --git a/types/search.go b/types/search.go index 77a53e4a..f8298c5a 100644 --- a/types/search.go +++ b/types/search.go @@ -38,5 +38,6 @@ type StateStat struct { // LineageStat stores Lineage stats type LineageStat struct { LineageValue string `json:"lineage_value"` + LastPath string `json:"last_path"` StateCount int `json:"state_count"` } From fa5a39b44c0a9a67879da9871706e6e5b7db5dd8 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Wed, 30 Jun 2021 15:48:10 +0200 Subject: [PATCH 04/27] feat: add lineage column on search view with filter --- api/api.go | 21 --------------------- db/db.go | 28 ---------------------------- static/main.html | 16 ++++++++++++++-- static/search.html | 5 +++++ static/terraboard.js | 13 +++++++++++++ types/search.go | 7 ------- 6 files changed, 32 insertions(+), 58 deletions(-) diff --git a/api/api.go b/api/api.go index ae6b62b0..f5ac7142 100644 --- a/api/api.go +++ b/api/api.go @@ -63,27 +63,6 @@ func ListStateStats(w http.ResponseWriter, r *http.Request, d *db.Database) { } } -// ListLineageStats returns Lineage information list -func ListLineageStats(w http.ResponseWriter, r *http.Request, d *db.Database) { - w.Header().Set("Access-Control-Allow-Origin", "*") - query := r.URL.Query() - lineages, page, total := d.ListLineageStats(query) - - // Build response object - response := make(map[string]interface{}) - response["lineages"] = lineages - response["page"] = page - response["total"] = total - j, err := json.Marshal(response) - if err != nil { - JSONError(w, "Failed to marshal lineages", err) - return - } - if _, err := io.WriteString(w, string(j)); err != nil { - log.Error(err.Error()) - } -} - // GetState provides information on a State func GetState(w http.ResponseWriter, r *http.Request, d *db.Database) { params := mux.Vars(r) diff --git a/db/db.go b/db/db.go index a5dfb466..e4d2d095 100644 --- a/db/db.go +++ b/db/db.go @@ -498,34 +498,6 @@ func (db *Database) ListStateStats(query url.Values) (states []types.StateStat, return } -// ListLineageStats returns a slice of LineageStat, along with paging information -func (db *Database) ListLineageStats(query url.Values) (lineages []types.LineageStat, page int, total int) { - row := db.Table("lineages").Select("count(DISTINCT value)").Row() - if err := row.Scan(&total); err != nil { - log.Error(err.Error()) - } - - offset := 0 - page = 1 - if v := string(query.Get("page")); v != "" { - page, _ = strconv.Atoi(v) // TODO: err - offset = (page - 1) * pageSize - } - - sql := "SELECT lineages.value as lineage_value, last_st.path as last_path, count(sts.*) as state_count" + - " FROM (SELECT DISTINCT ON(states.lineage_id) states.id, states.lineage_id FROM states ORDER BY states.lineage_id DESC) t" + - " JOIN lineages ON lineages.id = t.lineage_id" + - " JOIN states sts ON sts.lineage_id = lineages.id" + - " JOIN ( SELECT t1.lineage_id, max(t1.path) as path, max(t2.last_modified) as last_modified FROM states t1 JOIN versions t2 ON t2.id = t1.version_id GROUP BY t1.lineage_id) last_st ON last_st.lineage_id = lineages.id" + - " GROUP BY lineages.value, last_st.path" + - " ORDER BY state_count DESC" + - " LIMIT 20" + - " OFFSET ?" - - db.Raw(sql, offset).Find(&lineages) - return -} - // listField is a wrapper utility method to list distinct values in Database tables. func (db *Database) listField(table, field string) (results []string, err error) { rows, err := db.Table(table).Select(fmt.Sprintf("DISTINCT %s", field)).Rows() diff --git a/static/main.html b/static/main.html index 6b264aa5..6f188ea5 100644 --- a/static/main.html +++ b/static/main.html @@ -22,14 +22,26 @@

States locked

- Path + Lineage - TF Version - - Serial - - Time - - Resources - - Activity + State Count
- State Count + Latest State Path + + Total State Count
+ + + + diff --git a/static/search.html b/static/search.html index f0cbf135..1b52a303 100644 --- a/static/search.html +++ b/static/search.html @@ -73,6 +73,7 @@ +
@@ -94,6 +95,9 @@ + @@ -113,6 +117,7 @@ + diff --git a/static/terraboard.js b/static/terraboard.js index 8e617529..42f65bc6 100644 --- a/static/terraboard.js +++ b/static/terraboard.js @@ -432,6 +432,12 @@ app.controller("tbSearchCtrl", $http.get('api/attribute/keys').then(function(response){ $scope.attribute_keys = response.data; }); + $http.get('api/lineages').then(function(response){ + $scope.lineages = [] + response.data.forEach(element => { + $scope.lineages.push(element["lineage"]) + }); + }); $scope.refreshAttrKeys = function() { $http.get('api/attribute/keys?resource_type='+$scope.resType).then(function(response){ @@ -458,6 +464,9 @@ app.controller("tbSearchCtrl", if ($scope.tfVersion != undefined) { params.tf_version = $scope.tfVersion; } + if ($scope.lineage != undefined) { + params.lineage_value = $scope.lineage; + } if (page != undefined) { params.page = page; } @@ -490,11 +499,15 @@ app.controller("tbSearchCtrl", if ($location.search().tf_version != undefined) { $scope.tfVersion = $location.search().tf_version; } + if ($location.search().lineage != undefined) { + $scope.lineage = $location.search().lineage; + } $scope.doSearch(1); $scope.clearForm = function() { $scope.tfVersion = undefined; + $scope.lineage = undefined; $scope.resType = undefined; $scope.resID = undefined; $scope.attrKey = undefined; diff --git a/types/search.go b/types/search.go index f8298c5a..4c515cd9 100644 --- a/types/search.go +++ b/types/search.go @@ -34,10 +34,3 @@ type StateStat struct { LastModified time.Time `json:"last_modified"` ResourceCount int `json:"resource_count"` } - -// LineageStat stores Lineage stats -type LineageStat struct { - LineageValue string `json:"lineage_value"` - LastPath string `json:"last_path"` - StateCount int `json:"state_count"` -} From d524026f85746cc59b884caeb055dff093b0cc6b Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Thu, 15 Jul 2021 09:40:28 +0200 Subject: [PATCH 05/27] fix(lineage): code review issues * rename GetStateActivity functions to GetLineageActivity * change /api/state/activity to /api/lineage/activity * restore dynamic lock status on overview * fix missing version_id attribute in states quick access links * remove lineage display from overview --- static/main.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/static/main.html b/static/main.html index 6f188ea5..ccab73b1 100644 --- a/static/main.html +++ b/static/main.html @@ -22,12 +22,10 @@

States locked

+ Path + Lineage - Latest State Path + TF Version + + Serial + + Time + + Resources - Total State Count + Activity
Serial + Lineage + Module Path {{r.path}} {{r.tf_version}} {{r.serial}}{{r.lineage_value}} {{r.module_path}} {{r.resource_type}}.{{r.resource_name}}{{r.resource_index}} {{r.attribute_key}}
+ - From 81278be31b5fd40cf746fbc71241f1f56f98e93b Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Thu, 15 Jul 2021 15:59:20 +0200 Subject: [PATCH 06/27] refactor: remove obsolete lineage.html file --- static/lineage.html | 59 -------------------------------------------- static/search.html | 4 --- static/terraboard.js | 13 ---------- 3 files changed, 76 deletions(-) delete mode 100644 static/lineage.html diff --git a/static/lineage.html b/static/lineage.html deleted file mode 100644 index 1e07c24f..00000000 --- a/static/lineage.html +++ /dev/null @@ -1,59 +0,0 @@ -
-
- - -

Resource types

-
-
- - -

Terraform versions

-
-
- - -

States locked

-
-
-
-
- -
Path - Lineage - TF Version
- - - - - - - - - - - - - - - - - - - - -
- Path - - TF Version - - Serial - - Time - - Resources - - Activity -
{{r.path}}{{r.terraform_version}}{{r.serial}}{{r.last_modified | date:'medium'}}{{r.resource_count}} - -
- \ No newline at end of file diff --git a/static/search.html b/static/search.html index 1b52a303..e4955c3b 100644 --- a/static/search.html +++ b/static/search.html @@ -95,9 +95,6 @@ Serial - - Lineage - Module Path @@ -117,7 +114,6 @@ {{r.path}} {{r.tf_version}} {{r.serial}} - {{r.lineage_value}} {{r.module_path}} {{r.resource_type}}.{{r.resource_name}}{{r.resource_index}} {{r.attribute_key}} diff --git a/static/terraboard.js b/static/terraboard.js index 42f65bc6..8e617529 100644 --- a/static/terraboard.js +++ b/static/terraboard.js @@ -432,12 +432,6 @@ app.controller("tbSearchCtrl", $http.get('api/attribute/keys').then(function(response){ $scope.attribute_keys = response.data; }); - $http.get('api/lineages').then(function(response){ - $scope.lineages = [] - response.data.forEach(element => { - $scope.lineages.push(element["lineage"]) - }); - }); $scope.refreshAttrKeys = function() { $http.get('api/attribute/keys?resource_type='+$scope.resType).then(function(response){ @@ -464,9 +458,6 @@ app.controller("tbSearchCtrl", if ($scope.tfVersion != undefined) { params.tf_version = $scope.tfVersion; } - if ($scope.lineage != undefined) { - params.lineage_value = $scope.lineage; - } if (page != undefined) { params.page = page; } @@ -499,15 +490,11 @@ app.controller("tbSearchCtrl", if ($location.search().tf_version != undefined) { $scope.tfVersion = $location.search().tf_version; } - if ($location.search().lineage != undefined) { - $scope.lineage = $location.search().lineage; - } $scope.doSearch(1); $scope.clearForm = function() { $scope.tfVersion = undefined; - $scope.lineage = undefined; $scope.resType = undefined; $scope.resID = undefined; $scope.attrKey = undefined; From d13ac18b87102815c8fa1a091df4982d1dc08908 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Thu, 1 Jul 2021 09:12:48 +0200 Subject: [PATCH 07/27] feat(bootstrap): upgrade project to Bootstrap 4.1 and JQuery 3.3.1 --- static/index.html | 9 +-- static/main.html | 27 +++---- static/navbar.html | 50 +++++-------- static/search.html | 82 +++++++++------------- static/state.html | 160 +++++++++++++++++++++++++----------------- static/terraboard.css | 160 ++++++++++++++++++++++++++++++------------ 6 files changed, 282 insertions(+), 206 deletions(-) diff --git a/static/index.html b/static/index.html index 71139685..9b166f96 100644 --- a/static/index.html +++ b/static/index.html @@ -2,19 +2,20 @@ - + Terraboard - + - - + + + diff --git a/static/main.html b/static/main.html index ccab73b1..aaaa4a45 100644 --- a/static/main.html +++ b/static/main.html @@ -1,24 +1,27 @@
-
- - +
+

Resource types

-
- - +
+

Terraform versions

-
- - +
+

States locked

-
+
-
+
\ No newline at end of file diff --git a/static/state.html b/static/state.html index aeb9d3d3..05df3f6c 100644 --- a/static/state.html +++ b/static/state.html @@ -1,28 +1,35 @@
-
+
-
-
-

+
+
+

+ General Information - + + +

  • Version

    - - +
    • Terraform version: {{details.terraform_version}}
    • Serial: {{details.serial}}
  • -

    Compare with version

    - - - +

    Compare with version +

    + +
    • Terraform version: {{compare.stats.to.terraform_version}}
    • Serial: {{compare.stats.to.serial}}
    • @@ -30,49 +37,54 @@

      Compa

-
-
-

Modules

+
+
+

Modules

    -
  • - - +
  • +
  • -
    -

    {{mod.path ? mod.path : "root"}}

    - {{resFilter == "" ? '' : filteredRes.length+'/'}}{{Utils.keys(mod.resources).length}} +
    +

    {{mod.path ? mod.path : "root"}}

    + {{resFilter == "" ? '' : filteredRes.length+'/'}}{{Utils.keys(mod.resources).length}}
    • - {{r.type}}.{{r.name}}{{r.index}} -
    • -
    • Outputs
    • + ng-class="{selected: r == selectedres}" ng-click="setSelected(mod, r)" + class="list-group-item resource">{{r.type}}.{{r.name}}{{r.index}} +
    • Outputs
-
+

{{path}}

-
+

{{selectedres.type}}.{{selectedres.name}}{{selectedres.index}}

-
-
-

Attributes

+
+
+

Attributes

- + + + + - + @@ -82,77 +94,94 @@

Attributes

-
-

Outputs for {{selectedmod.path ? selectedmod.path : "root"}}

+
+

Outputs for {{selectedmod.path ? selectedmod.path : "root"}}

AttributeValue
AttributeValue
{{attr.key}} {{attr.value}}
- - + + - - - - + + + +
NameValueNameValue
{{out.name}}{{out.value}}
{{out.name}}{{out.value}}
-
-
-
-

- +
+
+

+ + + Differences + + {{differences}} +

-
-
-
+
+
+
{{resource}}
- +
-
-
-

- +
+ -
-
-
+
+
+
{{resource}}
- +
-
-
-

- +
+ -
-
-
+
+
+
{{resource}}
- +
@@ -160,3 +189,4 @@

+
\ No newline at end of file diff --git a/static/terraboard.css b/static/terraboard.css index 224ec075..cf29df26 100644 --- a/static/terraboard.css +++ b/static/terraboard.css @@ -2,17 +2,14 @@ .navbar-toggle { float: left; } - .navbar-right { position: absolute; top: 0; right: 20px; } - .breadcrumb { display: none; } - h2.node-title { white-space: nowrap; overflow: hidden; @@ -23,10 +20,10 @@ @media (min-width: 992px) { body, html, #mainrow, #leftcol { margin: 0; - height:100%; + height: 100%; } - .container{ - width: 85vw; + .container { + max-width: 65vw; } #maincont, #leftcol .panel-group { overflow: hidden; @@ -44,66 +41,75 @@ height: 100%; } #states-select { - margin: 10px; + margin: 10px; } #states-select a { - color: black; + color: black; } } -body { padding-top: 60px; } #chart { height: 310px; } + #chart svg { margin-left: calc((100% - 310px)/2); } -#chart svg g path, #chart svg g g, #nodeslist li, .panel-title a, .ack, .star, - .resource-title, .resource-title ~ pre { + +#chart svg g path, #chart svg g g, #nodeslist li, .panel-title a, .ack, .star, .resource-title, .resource-title~pre { cursor: pointer; } -#chart > div { + +#chart>div { margin-top: calc(350px / 2); } -#nodeslist .list-group-item .resource:hover, -#only-in-old .list-group-item:hover, -#only-in-new .list-group-item:hover { + +#nodeslist .list-group-item .resource:hover, #only-in-old .list-group-item:hover, #only-in-new .list-group-item:hover { background-color: #d9edf7; background-image: none; color: #337ab7; } + #nodeslist .list-group-item.selected { background-color: #d9edf7; color: #337ab7; } + #nodeslist .list-group-item .resource.selected { background-color: #d9edf7; color: #337ab7; } + #nodeslist .list-group-item .glyphicon-star, .panel-title .glyphicon-star { float: right; color: orange; display: none; } + #nodeslist .list-group-item.starred .glyphicon-star, .panel-title.starred .glyphicon-star { display: block; } + #node .list-group { padding: 0 10px 0 10px; } + #node .list-group.active { border-left: solid #4D90F0; padding-left: 7px; } + .compile-error { color: red; font-weight: bold; white-space: normal; } + .panel-title .badge { float: right; margin-right: 10px; } + .back-to-top { position: fixed; top: 10px; @@ -113,27 +119,32 @@ body { padding-top: 60px; } z-index: 99999; cursor: pointer; } + #node .diff-stats .progress { text-align: center; width: 5em; display: inline; float: right; } + #nodeslist .node-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + #nodeslist .progress { text-align: center; display: inline; float: right; margin-left: 5px; } + .btn-file { position: relative; overflow: hidden; } + .btn-file input[type=file] { position: absolute; top: 0; @@ -149,116 +160,177 @@ body { padding-top: 60px; } cursor: inherit; display: block; } + .btn-checkbox { top: -2px; color: #777; padding: 15px 0 15px 20px; } + #nodeslist .progress-bar { text-indent: -9999px; // Hide text to the left } + #nodeslist .progress-bar:hover { - text-indent: 0; // Reveal text + text-indent: 0; // Reveal text } + #nodeslist .progress-bar { float: right; } + pre.sh_sourceCode .sh_oldfile { color: red !important; } + .resource-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + .resource-title:hover { text-overflow: clip; overflow: auto; } + #pages { - margin: 0 auto; - width: 30vh; + margin: 0 auto; + width: 30vh; } + #navigate span { cursor: pointer; } + .overview-chart { text-align: center; } + .jqstooltip { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } -.form-inline .ui-select-container .ui-select-toggle, -.form-inline .ui-select-container .ui-select-search { + +.form-inline .ui-select-container .ui-select-toggle, .form-inline .ui-select-container .ui-select-search { width: 100%; } -.ui-select-match-text{ + +.ui-select-match-text { width: 100%; overflow: hidden; text-overflow: ellipsis; padding-right: 40px; } -.ui-select-toggle > .btn.btn-link { + +.ui-select-toggle>.btn.btn-link { margin-right: 10px; top: 6px; position: absolute; right: 10px; } - /* * Node attribute table */ + #node { - overflow-x: hidden; + overflow-x: hidden; } td.attr-val { - white-space: pre; - max-width: 25vw; + white-space: pre; + max-width: 25vw; } #node td.attr-val, #nodes li.list-group-item { - text-overflow: ellipsis; - overflow: hidden; + text-overflow: ellipsis; + overflow: hidden; } + #node td:hover, #nodes li.list-group-item:hover { - text-overflow: clip; - overflow: auto; + text-overflow: clip; + overflow: auto; } /* * General information versions */ + #leftcol h4 { - display: inline-block; + display: inline-block; } + #leftcol span.badge.pull-right { - /* force align with h4 */ - margin-top: 10px; + /* force align with h4 */ + margin-top: 10px; } /* * Resource filter */ + #resFilterClear { - position: absolute; - right: 20px; - top: 0; - bottom: 0; - height: 14px; - margin: auto; - font-size: 14px; - cursor: pointer; - color: #ccc; + position: absolute; + right: 20px; + top: 0; + bottom: 0; + height: 14px; + margin: auto; + font-size: 14px; + cursor: pointer; + color: #ccc; } - /* * Sparkline */ + .sparkline { - cursor: pointer; + cursor: pointer; } + +/* + * Compatibility CSS for ui-select with Bootstrap 4 + */ + +.pull-left { + float: left !important; +} + +.caret { + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid; + display: inline-block; + margin-left: 0; + vertical-align: middle; + width: 0; +} + +.pull-right { + float: right !important; +} + +.ui-select-toggle.btn { + border: 1px solid #ced4da; +} + +.ui-select-choices.dropdown-menu { + display: block; +} + +.ui-select-match-text { + max-height: 24px; +} + +.ui-select-match.btn-default-focus { + border-radius: .25rem; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25); + outline: 0; +} + +.ui-select-match.btn-default-focus>.ui-select-toggle { + border-color: #80bdff; +} \ No newline at end of file From dd814129240ba3ad6aa53a018cb4dc2e95d88695 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Thu, 1 Jul 2021 13:30:08 +0200 Subject: [PATCH 08/27] feat(bootstrap): add FontAwesome instead of old Glyphicon * fix layout/style issues --- static/footer.html | 2 +- static/index.html | 5 +- static/main.html | 16 +++--- static/navbar.html | 4 +- static/search.html | 112 +++++++++++++++++++++--------------------- static/select.min.css | 2 +- static/select.min.js | 4 +- static/state.html | 8 +-- static/terraboard.css | 18 ++++--- 9 files changed, 89 insertions(+), 82 deletions(-) diff --git a/static/footer.html b/static/footer.html index 7bcb28a3..757a5d1a 100644 --- a/static/footer.html +++ b/static/footer.html @@ -1,4 +1,4 @@ -