Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
feat: Bump CDK Dynamo Table Viewer dependency. (#1394)
Browse files Browse the repository at this point in the history
- Bump CDK Dynamo Table Viewer dependency.
- Use CSS class for Prev/Next links rendered for a section.



Fixes #1139
Fixes #1231

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT-0 License].

[MIT-0 License]: https://github.com/aws/mit-0/blob/master/MIT-0
  • Loading branch information
ashishdhingra authored Apr 17, 2024
1 parent 975913d commit 9d2129d
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 43 deletions.
13 changes: 13 additions & 0 deletions workshop/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,17 @@ $codeFF: {{ i18n "codeFontFamily" }};

body {
font-size:calc(14pt + 0.081vw);
}

.nextprev-container {
padding-bottom: 25px;
margin-bottom: 10px;
}

.float-left {
float: left;
}

.float-right {
float: right;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ Before you can use the table viewer in your application, you'll need to install
the npm module:

```
npm install [email protected].46
npm install [email protected].488
```

Output should look like this:

```
+ [email protected]
added 1 package from 1 contributor and audited 886517 packages in 6.704s
added 1 package, and audited 392 packages in 377ms
49 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the python module. Add this code to `requirements.txt`:
{{<highlight python "hl_lines=3">}}
aws-cdk-lib==2.37.0
constructs>=10.0.0,<11.0.0
cdk-dynamo-table-view==0.2.0
cdk-dynamo-table-view==0.2.488
{{</highlight>}}

Once the virtualenv is activated, you can install the required dependencies.
Expand All @@ -24,7 +24,7 @@ The last two lines of the output (there's a lot of it) should look like this:

```
Installing collected packages: cdk-dynamo-table-view
Successfully installed cdk-dynamo-table-view-0.2.0
Successfully installed cdk-dynamo-table-view-0.2.488
```

----
Expand Down
15 changes: 5 additions & 10 deletions workshop/content/english/40-dotnet/50-table-viewer/200-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,19 @@ Before you can use the table viewer in your application, you'll need to install
the Nuget package:

```
dotnet add package Cdklabs.DynamoTableViewer --version 0.2.4
dotnet add package Cdklabs.DynamoTableViewer --version 0.2.488
```
During installation if you get package restore failed errors, kindly resolve the conflicts by updating packages to latest versions using command `dotnet add package <package-name>`.

Output should look similar to this:

```
info : Adding PackageReference for package 'Eladb.DynamoTableViewer' into project '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Adding PackageReference for package 'Cdklabs.DynamoTableViewer' into project '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Restoring packages for ~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj...
info : GET https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/index.json
info : OK https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/index.json 240ms
info : GET https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/0.2.4/cdklabs.dynamotableviewer.0.2.4.nupkg
info : OK https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/0.2.4/cdklabs.dynamotableviewer.0.2.4.nupkg 241ms
info : Installing Cdklabs.DynamoTableViewer 0.2.4.
info : Package 'Cdklabs.DynamoTableViewer' is compatible with all the specified frameworks in project '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : PackageReference for package 'Cdklabs.DynamoTableViewer' version '0.2.4' added to file '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Committing restore...
info : PackageReference for package 'Cdklabs.DynamoTableViewer' version '0.2.488' added to file '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Writing assets file to disk. Path: ~/cdk-workshop/src/CdkWorkshop/obj/project.assets.json
log : Restore completed in 1.31 sec for ~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj.
log : Restored ~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj (in 104 ms).
```

{{% notice info %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Before you can use the table viewer in your application, you'll need to add the
<dependency>
<groupId>io.github.cdklabs</groupId>
<artifactId>cdk-dynamo-table-view</artifactId>
<version>0.2.0</version>
<version>0.2.488</version>
<exclusions>
<exclusion>
<groupId> software.amazon.jsii</groupId>
<groupId>software.amazon.jsii</groupId>
<artifactId>jsii-runtime</artifactId>
</exclusion>
</exclusions>
Expand Down
2 changes: 1 addition & 1 deletion workshop/content/english/50-java/50-table-viewer/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bookFlatSection = true
# Using construct libraries

In this chapter we will import a construct library called
[cdk-dynamo-table-view](https://search.maven.org/artifact/io.github.cdklabs/cdk-dynamo-table-view/0.2.0/jar)
[cdk-dynamo-table-view](https://search.maven.org/artifact/io.github.cdklabs/cdk-dynamo-table-view/0.2.488/jar)
into our project and install it on our hit counter table.

![](/images/table-viewer.png)
Expand Down
5 changes: 3 additions & 2 deletions workshop/content/english/60-go/50-table-viewer/200-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ go get github.com/cdklabs/cdk-dynamo-table-viewer-go/dynamotableviewer
Output should look like this:

```
go: upgraded github.com/aws/jsii-runtime-go v1.63.2 => v1.65.0
go: added github.com/cdklabs/cdk-dynamo-table-viewer-go/dynamotableviewer v0.2.248
go: upgraded github.com/aws/constructs-go/constructs/v10 v10.0.5 => v10.3.0
go: upgraded github.com/aws/jsii-runtime-go v1.29.0 => v1.96.0
go: added github.com/cdklabs/cdk-dynamo-table-viewer-go/dynamotableviewer v0.2.488
```

----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight = 200
アプリケーションで table viewer を使用するために、npm モジュールをインストールする必要があります。

```
npm install [email protected].46
npm install [email protected].488
```

{{% notice info %}}
Expand All @@ -20,8 +20,11 @@ npm install [email protected]
出力は次のようになります。

```text
+ [email protected]
added 1 package from 1 contributor and audited 886517 packages in 6.704s
added 1 package, and audited 392 packages in 377ms
49 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ weight = 200
{{<highlight python "hl_lines=3">}}
aws-cdk-lib==2.37.0
constructs>=10.0.0,<11.0.0
cdk-dynamo-table-view==0.2.0
cdk-dynamo-table-view==0.2.488
{{</highlight>}}

virtualenv が有効であれば、次のコマンドで依存関係をインストールすることができます。
Expand All @@ -23,7 +23,7 @@ $ pip install -r requirements.txt

```
Installing collected packages: cdk-dynamo-table-view
Successfully installed cdk-dynamo-table-view-0.2.0
Successfully installed cdk-dynamo-table-view-0.2.488
```

これで、アプリケーションに table viewer を追加する準備ができました。
Expand Down
14 changes: 4 additions & 10 deletions workshop/content/japanese/40-dotnet/50-table-viewer/200-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,18 @@ weight = 200


```
dotnet add package Cdklabs.DynamoTableViewer --version 0.2.4
dotnet add package Cdklabs.DynamoTableViewer --version 0.2.488
```

出力は次のようになります。

```
info : Adding PackageReference for package 'Eladb.DynamoTableViewer' into project '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Adding PackageReference for package 'Cdklabs.DynamoTableViewer' into project '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Restoring packages for ~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj...
info : GET https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/index.json
info : OK https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/index.json 240ms
info : GET https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/0.2.4/cdklabs.dynamotableviewer.0.2.4.nupkg
info : OK https://api.nuget.org/v3-flatcontainer/cdklabs.dynamotableviewer/0.2.4/cdklabs.dynamotableviewer.0.2.4.nupkg 241ms
info : Installing Cdklabs.DynamoTableViewer 0.2.4.
info : Package 'Cdklabs.DynamoTableViewer' is compatible with all the specified frameworks in project '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : PackageReference for package 'Cdklabs.DynamoTableViewer' version '0.2.4' added to file '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Committing restore...
info : PackageReference for package 'Cdklabs.DynamoTableViewer' version '0.2.488' added to file '~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj'.
info : Writing assets file to disk. Path: ~/cdk-workshop/src/CdkWorkshop/obj/project.assets.json
log : Restore completed in 1.31 sec for ~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj.
log : Restored ~/cdk-workshop/src/CdkWorkshop/CdkWorkshop.csproj (in 104 ms).
```

{{% notice info %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ weight = 200
<dependency>
<groupId>io.github.cdklabs</groupId>
<artifactId>cdk-dynamo-table-view</artifactId>
<version>0.2.0</version>
<version>0.2.488</version>
<exclusions>
<exclusion>
<groupId> software.amazon.jsii</groupId>
<groupId>software.amazon.jsii</groupId>
<artifactId>jsii-runtime</artifactId>
</exclusion>
</exclusions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bookFlatSection = true

# コンストラクトライブラリの利用

このチャプターでは、[cdk-dynamo-table-view](https://search.maven.org/artifact/io.github.cdklabs/cdk-dynamo-table-view/0.2.0/jar) というコンストラクトライブラリをプロジェクトにインポートし、HitCounter テーブルに利用します。
このチャプターでは、[cdk-dynamo-table-view](https://search.maven.org/artifact/io.github.cdklabs/cdk-dynamo-table-view/0.2.488/jar) というコンストラクトライブラリをプロジェクトにインポートし、HitCounter テーブルに利用します。

![](/images/table-viewer.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ go get github.com/cdklabs/cdk-dynamo-table-viewer-go/dynamotableviewer
Output should look like this:

```
go: upgraded github.com/aws/jsii-runtime-go v1.63.2 => v1.65.0
go: added github.com/cdklabs/cdk-dynamo-table-viewer-go/dynamotableviewer v0.2.248
go: upgraded github.com/aws/constructs-go/constructs/v10 v10.0.5 => v10.3.0
go: upgraded github.com/aws/jsii-runtime-go v1.29.0 => v1.96.0
go: added github.com/cdklabs/cdk-dynamo-table-viewer-go/dynamotableviewer v0.2.488
```

----
Expand Down
6 changes: 3 additions & 3 deletions workshop/layouts/shortcodes/nextprevlinks.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<hr />

<div style="padding-bottom: 25px;margin-bottom: 10px;">
<div style="float: left;">
<div class="nextprev-container">
<div class="float-left">
{{ if .Page.NextInSection }}
{{ with .Page.NextInSection }} <!-- This will return NULL if current page is first in section. -->
<a href="{{ .Page.RelPermalink }}" class="book-btn">Previous</a>
Expand All @@ -16,7 +16,7 @@
{{ end }}
{{ end }}
</div>
<div style="float: right;">
<div class="float-right">
{{ if eq .Page.CurrentSection .Page }} <!-- If current page is same as index page for section. -->
{{ if ge (len .Page.CurrentSection.Pages) 0 }} <!-- If current section has pages, render Next link pointing to 1st page. -->
<a href="{{ (index .Page.CurrentSection.Pages 0).RelPermalink }}" class="book-btn">Next</a>
Expand Down

0 comments on commit 9d2129d

Please sign in to comment.