From 52373e42e7b11961fcff298822d5ba025e0dedfd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 26 Feb 2019 17:27:35 +0900 Subject: html: add team menu Signed-off-by: Kuninori Morimoto --- scripts/html.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'scripts') diff --git a/scripts/html.py b/scripts/html.py index cdc77c9..11f573f 100755 --- a/scripts/html.py +++ b/scripts/html.py @@ -172,6 +172,7 @@ class periject_html(base.base): with html("table", {"border":"1"}): with html("tr"): html("th").print("file") + html("th").print("team") html("th").print("assignee") html("th").print("title") for file in files: @@ -184,6 +185,10 @@ class periject_html(base.base): subbody.option({"href":self.relpath_y2h(file, dir)}) html("td").print(subbody.text(os.path.basename(file).replace(".yaml", ""))) + team = v.get_data("team") + summary.option({"href":self.relpath("html/{}.html".format(team), dir)}) + html("td").print(summary.text(team)) + assignee = v.get_data("assignee") summary.option({"href":self.relpath("html/{}.html".format(assignee), dir)}) html("td").print(summary.text(assignee)) @@ -288,6 +293,16 @@ class periject_html(base.base): html("li").print(html("a", {"target":"summary", "href":"./{}.html".format(status)}).text(status)) + #-------------------- + # menu_team + #-------------------- + def menu_team(self): + # from project.schema.yaml + with html("ul"): + for status in ['Core', 'IO', 'MM']: + html("li").print(html("a", {"target":"summary", + "href":"./{}.html".format(status)}).text(status)) + #-------------------- # menu_bsp #-------------------- @@ -311,6 +326,9 @@ class periject_html(base.base): html("h1").print("Status") self.menu_status() + html("h1").print("Team") + self.menu_team() + html("h1").print("BSP") self.menu_bsp() @@ -328,11 +346,13 @@ class periject_html(base.base): dir = os.path.dirname(v.file) assignee = v.get_data("assignee") status = v.get_data("status") + team = v.get_data("team") with html("table", {"border":"1"}): with html("tr"): html("th").print("file") html("th").print("status") + html("th").print("team") html("th").print("assignee") html("th").print("key") @@ -340,6 +360,8 @@ class periject_html(base.base): html("td").print(os.path.relpath(v.file, self.top())) html("td").print(html("a", {"target":"summary", "href":self.relpath("html/{}.html".format(status), dir)}).text(status)) + html("td").print(html("a", {"target":"summary", + "href":self.relpath("html/{}.html".format(team), dir)}).text(team)) html("td").print(html("a", {"target":"summary", "href":self.relpath("html/{}.html".format(assignee), dir)}).text(assignee)) html("td").print(v.get_data("key")) @@ -509,6 +531,16 @@ class periject_html(base.base): with html("body"): self.__summary(None, "{}/html".format(self.top()), argv) + #-------------------- + # team + #-------------------- + def team(self, argv): + + team = argv.pop(0) + + with html("body"): + self.__summary(team, "{}/html".format(self.top()), argv) + #-------------------- # bsp #-------------------- @@ -581,6 +613,9 @@ class periject_html(base.base): elif (cmd == "status"): # ./script/find.py -s Active | xargs ./script/html.py status Active self.status(sys.argv) + elif (cmd == "team"): + # ./script/find.py -t Core | xargs ./script/html.py status Core + self.team(sys.argv) elif (cmd == "bsp"): # ./script/html.py bsp xxx.yaml xxx.yaml ... self.bsp(sys.argv) -- cgit v1.2.3