Skip to content
This repository was archived by the owner on Jan 27, 2021. It is now read-only.

Commit e2082c1

Browse files
authored
Merge pull request #34 from owncloud/use-phoenix-server-url
2 parents 69693c5 + 6084aa0 commit e2082c1

File tree

7 files changed

+17
-12
lines changed

7 files changed

+17
-12
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Change: Use server config variable from ocis-web
2+
3+
We are not providing an api url anymore but use the server url from ocis-web config instead. This still - as before - requires that ocis-proxy is in place for routing requests to ocis-settings.
4+
5+
https://github.com/owncloud/ocis-settings/pull/34

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@
5959
"> 1%",
6060
"not dead"
6161
],
62+
"peerDependencies": {
63+
"owncloud-design-system": "^1.7.0"
64+
},
6265
"dependencies": {
6366
"lodash": "^4.17.15",
64-
"owncloud-design-system": "^1.6.0",
6567
"vuex": "^3.2.0"
6668
}
6769
}

pkg/assets/embed.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/command/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func Server(cfg *config.Config) *cli.Command {
161161

162162
gr.Add(server.Run, func(_ error) {
163163
logger.Info().
164-
Str("server", "http").
164+
Str("server", "grpc").
165165
Msg("Shutting down server")
166166

167167
cancel()

pkg/server/http/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func Server(opts ...Option) http.Service {
4646
)
4747

4848
mux.Use(middleware.Version(
49-
"settings",
49+
options.Name,
5050
version.String,
5151
))
5252

ui/app.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ const appInfo = {
1212
id: 'settings',
1313
icon: 'application',
1414
isFileEditor: false,
15-
extensions: [],
16-
config: {
17-
url: 'https://localhost:9200'
18-
}
15+
extensions: []
1916
}
2017

2118
const routes = [

ui/store/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const mutations = {
4848
}
4949

5050
const actions = {
51+
// Used by ocis-web.
5152
loadConfig ({ commit }, config) {
5253
commit('LOAD_CONFIG', config)
5354
},
@@ -60,7 +61,7 @@ const actions = {
6061
async fetchSettingsBundles ({ commit, dispatch, getters, rootGetters }) {
6162
injectAuthToken(rootGetters)
6263
const response = await BundleService_ListSettingsBundles({
63-
$domain: getters.config.url,
64+
$domain: rootGetters.configuration.server,
6465
body: {}
6566
})
6667
if (response.status === 201) {
@@ -100,7 +101,7 @@ const actions = {
100101
async saveSettingsValue ({ commit, dispatch, getters, rootGetters }, payload) {
101102
injectAuthToken(rootGetters)
102103
const response = await ValueService_SaveSettingsValue({
103-
$domain: getters.config.url,
104+
$domain: rootGetters.configuration.server,
104105
body: {
105106
settingsValue: payload
106107
}

0 commit comments

Comments
 (0)