Skip to content

Commit 56cfa06

Browse files
authored
Merge pull request linode#100 from linode/release-1.1.1
Release 1.1.1
2 parents 5554b3d + 331354f commit 56cfa06

File tree

3 files changed

+57
-10
lines changed

3 files changed

+57
-10
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: '4.7.0: 2019-10-21'
3+
date: 2019-10-21T12:00:00.000Z
4+
version: 4.7.0
5+
changelog:
6+
- API
7+
---
8+
### Added
9+
10+
* Added the `tfa_enabled` property to the [/account/users](/api/v4/account-users) endpoint collection. This property returns a boolean value indicating if the User has Two Factor Authentication (TFA) enabled. See the Create Two Factor Secret ([POST /profile/tfa-enable](https://developers.linode.com/api/v4/profile-tfa-enable#post)) endpoint to enable TFA.
11+
* Added the `upgrade` property to the Initiate Pending Host Migration/DC Migration ([POST /linode/instances/{linodeId}/migrate](https://developers.linode.com/api/v4/linode-instances-linode-id-migrate/#post)) endpoint
12+
* The `secondary_entity` property of a `disk_delete` Event will now be populated with the disk that has been deleted. This property was not previously assigned a value. The primary `entity` property for a `disk_delete` Event is associated with the Linode that the disk was deleted from.
13+
* Refer to the List Events ([GET /account/events](https://developers.linode.com/api/v4/account-events)) and View Event ([GET /account/events/{eventId}](https://developers.linode.com/api/v4/account-events-event-id)) endpoints to review your Events.
14+
15+
### Changed
16+
17+
* Changed how Notifications for promotional credits are generated:
18+
* For expiring promotional credits, a Notification was only generated when the promotion was within 7 days of expiring _and_ when 90% of the credit had been used. This Notification would be of type `promotion`.
19+
* Now, two different Notifications are generated:
20+
* A Notification of type `promo_expiration` will be generated when the promotion is within 7 days of its expiration date.
21+
* A Notification of type `promo_credit_limit` will be generated when 90% or more of the promotion's credit has been used.
22+
* Notifications of type `promotion` will no longer be generated.
23+
* Refer to the List Notifications ([GET /account/notifications](https://developers.linode.com/api/v4/account-notifications)) endpoint to view your account's notifications. Refer to the `active_promotions` property in the response from the View Account ([GET /account](https://developers.linode.com/api/v4/account)) endpoint for details of your current promotions.
24+
25+
### Fixed
26+
27+
* Improved the error response messages of the Initiate Pending Host Migration/DC Migration ([POST /linode/instances/{linodeId}/migrate](https://developers.linode.com/api/v4/linode-instances-linode-id-migrate/#post)) endpoint:
28+
* This endpoint will return an error when called when both of these conditions are true:
29+
* The Linode has a /116 IPv6 pool, or IP Sharing is enabled.
30+
* An NGN data center was specified for the `region` property.
31+
* Previously, the error message returned when a /116 pool caused the migration to fail would state that IP Sharing was enabled, which may not have been the case.
32+
* The endpoint will now return a different error message when a /116 IPv6 pool is present.
33+
* Support Tickets returned by the List Support Tickets ([GET /support/tickets](https://developers.linode.com/api/v4/support-tickets)) endpoint can now be sorted by the `closed`, `opened`, and `updated` properties of a Ticket. This was the intended behavior, but specifying a sorting was not previously honored in the response.
34+
* In rare circumstances, a Linode may exist without an Invoice Item that corresponds to it. If the Initiate Pending Host Migration/DC Migration ([POST /linode/instances/{linodeId}/migrate](https://developers.linode.com/api/v4/linode-instances-linode-id-migrate/#post)) endpoint was called on a Linode under these circumstances, the endpoint would return an error. This error will no longer appear, and the migration will proceed normally (or fail for any other reasons listed in the endpoint's documentation).
35+
* The Import Domain ([POST /domains/import](https://developers.linode.com/api/v4/domains-import/#post)) endpoint would sometimes return a 400 error code when a server error had occurred. A 500 error code will now be returned instead, which is in line with our API's [guidance on error codes](https://developers.linode.com/api/v4/#errors).

src/css/components/0_utilities/typography.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ input[type="text"] {
2222
@apply p-4 mt-2 mb-2 bg-ThemeBeige block;
2323
}
2424

25-
.api-body pre code {
26-
@apply p-2 mt-2 mb-4 bg-ThemeBeige block;
27-
overflow-x: auto;
28-
}
29-
30-
.api-body code {
31-
@apply p-1 bg-ThemeBeige;
32-
}
33-
3425
.api-desc code {
3526
@apply font-normal px-1 bg-ThemeTagGrey inline text-xs relative;
3627
padding-top: 4px;

src/pages/api/v4.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React from "react";
22
// import PropTypes from "prop-types";
33
import { graphql, StaticQuery } from "gatsby";
44
import Markdown from "react-markdown/with-html";
5+
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
6+
import { atomDark } from "react-syntax-highlighter/dist/esm/styles/prism";
57

68
import Layout from "../../components/4_layouts/layout";
79
import SEO from "../../components/0_utilities/seo";
@@ -27,6 +29,25 @@ const HeadingRenderer = props => {
2729
return <Heading {...props} />;
2830
};
2931

32+
class CodeBlock extends React.PureComponent {
33+
render() {
34+
const { value } = this.props;
35+
36+
return (
37+
<SyntaxHighlighter
38+
language="shell"
39+
style={atomDark}
40+
className="api-samples"
41+
codeTagProps={{
42+
style: { whiteSpace: "pre-wrap" }
43+
}}
44+
>
45+
{value}
46+
</SyntaxHighlighter>
47+
);
48+
}
49+
}
50+
3051
class APIDocs extends React.Component {
3152
componentDidMount() {
3253
window.addEventListener("scroll", () => {
@@ -58,7 +79,7 @@ class APIDocs extends React.Component {
5879
<Markdown
5980
source={n.info.description}
6081
escapeHtml={false}
61-
renderers={{ heading: HeadingRenderer }}
82+
renderers={{ heading: HeadingRenderer, code: CodeBlock }}
6283
className="md:mt-8 api-body"
6384
/>
6485
</div>

0 commit comments

Comments
 (0)