diff options
-rw-r--r-- | docker/0.5/Dockerfile | 100 | ||||
-rwxr-xr-x | docker/0.5/Dockerrun.aws.json | 13 | ||||
-rwxr-xr-x | docker/0.5/docker-entry.sh | 122 | ||||
-rw-r--r-- | docker/0.5/main.cf | 28 | ||||
-rw-r--r-- | docker/0.6/Dockerrun.aws.zip | bin | 867 -> 0 bytes | |||
-rw-r--r-- | docker/0.6/config_docker.json | 99 | ||||
-rw-r--r-- | docker/1.0/Dockerfile (renamed from docker/0.6/Dockerfile) | 8 | ||||
-rw-r--r-- | docker/1.0/Dockerrun.aws.zip | bin | 0 -> 711 bytes | |||
-rw-r--r-- | docker/1.0/Dockerrun.aws/.ebextensions/01_files.config (renamed from docker/0.6/Dockerrun.aws/.ebextensions/01_files.config) | 0 | ||||
-rwxr-xr-x | docker/1.0/Dockerrun.aws/Dockerrun.aws.json (renamed from docker/0.6/Dockerrun.aws/Dockerrun.aws.json) | 2 | ||||
-rw-r--r-- | docker/1.0/config_docker.json | 89 | ||||
-rwxr-xr-x | docker/1.0/docker-entry.sh (renamed from docker/0.6/docker-entry.sh) | 0 | ||||
-rw-r--r-- | model/version.go | 2 | ||||
-rw-r--r-- | model/version_test.go | 2 | ||||
-rw-r--r-- | web/react/components/admin_console/gitlab_settings.jsx | 40 |
15 files changed, 115 insertions, 390 deletions
diff --git a/docker/0.5/Dockerfile b/docker/0.5/Dockerfile deleted file mode 100644 index fec69280e..000000000 --- a/docker/0.5/Dockerfile +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. -# See License.txt for license information. -FROM ubuntu:14.04 - -# Install Dependancies -RUN apt-get update && apt-get install -y build-essential -RUN apt-get install -y curl -RUN curl -sL https://deb.nodesource.com/setup | bash - -RUN apt-get install -y nodejs -RUN apt-get install -y ruby-full -RUN gem install compass - -# Postfix -RUN apt-get install -y postfix - -# -# Install GO -# - -RUN apt-get update && apt-get install -y \ - gcc libc6-dev make git mercurial \ - --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* - -ENV GOLANG_VERSION 1.4.2 - -RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \ - | tar -v -C /usr/src -xz - -RUN cd /usr/src/go/src && ./make.bash --no-clean 2>&1 - -ENV PATH /usr/src/go/bin:$PATH - -RUN mkdir -p /go/src /go/bin && chmod -R 777 /go -ENV GOPATH /go -ENV PATH /go/bin:$PATH -WORKDIR /go - -# --------------------------------------------------------------------------------------------------------------------- - -# -# Install SQL -# - -ENV MYSQL_ROOT_PASSWORD=mostest -ENV MYSQL_USER=mmuser -ENV MYSQL_PASSWORD=mostest -ENV MYSQL_DATABASE=mattermost_test - -RUN groupadd -r mysql && useradd -r -g mysql mysql - -RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf /var/lib/apt/lists/* - -RUN apt-key adv --keyserver pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 - -ENV MYSQL_MAJOR 5.6 -ENV MYSQL_VERSION 5.6.25 - -RUN echo "deb http://repo.mysql.com/apt/debian/ wheezy mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list - -RUN apt-get update \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install mysql-server \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql - -RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf - -VOLUME /var/lib/mysql -# --------------------------------------------------------------------------------------------------------------------- - -# -# Install Redis -# - -RUN apt-get update && apt-get install -y wget -RUN wget http://download.redis.io/redis-stable.tar.gz; \ - tar xvzf redis-stable.tar.gz; \ - cd redis-stable; \ - make install - -# --------------------------------------------------------------------------------------------------------------------- - -# Copy over files -ADD https://github.com/mattermost/platform/archive/v0.50.tar.gz /go/src/github.com/mattermost/ -RUN mkdir /go/src/github.com/mattermost/platform && tar -zxvf /go/src/github.com/mattermost/v0.50.tar.gz -C /go/src/github.com/mattermost/platform --strip-components=1 - -# Insert postfix config -ADD ./main.cf /etc/postfix/ - -RUN go get github.com/tools/godep -RUN cd /go/src/github.com/mattermost/platform; godep restore -RUN go install github.com/mattermost/platform -RUN cd /go/src/github.com/mattermost/platform/web/react; npm install - -RUN chmod +x /go/src/github.com/mattermost/platform/docker/docker-entry.sh -ENTRYPOINT /go/src/github.com/mattermost/platform/docker/docker-entry.sh - -# Ports -EXPOSE 80 diff --git a/docker/0.5/Dockerrun.aws.json b/docker/0.5/Dockerrun.aws.json deleted file mode 100755 index 04c7f4224..000000000 --- a/docker/0.5/Dockerrun.aws.json +++ /dev/null @@ -1,13 +0,0 @@ -{
- "AWSEBDockerrunVersion": "1",
- "Image": {
- "Name": "mattermost/platform:helium",
- "Update": "true"
- },
- "Ports": [
- {
- "ContainerPort": "80"
- }
- ],
- "Logging": "/var/log/"
-}
diff --git a/docker/0.5/docker-entry.sh b/docker/0.5/docker-entry.sh deleted file mode 100755 index cfa589041..000000000 --- a/docker/0.5/docker-entry.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash -# Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. -# See License.txt for license information. - -mkdir -p web/static/js - -echo "127.0.0.1 dockerhost" >> /etc/hosts -/etc/init.d/networking restart - -echo configuring mysql - -# SQL!!! -set -e - -get_option () { - local section=$1 - local option=$2 - local default=$3 - ret=$(my_print_defaults $section | grep '^--'${option}'=' | cut -d= -f2-) - [ -z $ret ] && ret=$default - echo $ret -} - - -# Get config -DATADIR="$("mysqld" --verbose --help 2>/dev/null | awk '$1 == "datadir" { print $2; exit }')" -SOCKET=$(get_option mysqld socket "$DATADIR/mysql.sock") -PIDFILE=$(get_option mysqld pid-file "/var/run/mysqld/mysqld.pid") - -if [ ! -d "$DATADIR/mysql" ]; then - if [ -z "$MYSQL_ROOT_PASSWORD" -a -z "$MYSQL_ALLOW_EMPTY_PASSWORD" ]; then - echo >&2 'error: database is uninitialized and MYSQL_ROOT_PASSWORD not set' - echo >&2 ' Did you forget to add -e MYSQL_ROOT_PASSWORD=... ?' - exit 1 - fi - - mkdir -p "$DATADIR" - chown -R mysql:mysql "$DATADIR" - - echo 'Running mysql_install_db' - mysql_install_db --user=mysql --datadir="$DATADIR" --rpm --keep-my-cnf - echo 'Finished mysql_install_db' - - mysqld --user=mysql --datadir="$DATADIR" --skip-networking & - for i in $(seq 30 -1 0); do - [ -S "$SOCKET" ] && break - echo 'MySQL init process in progress...' - sleep 1 - done - if [ $i = 0 ]; then - echo >&2 'MySQL init process failed.' - exit 1 - fi - - # These statements _must_ be on individual lines, and _must_ end with - # semicolons (no line breaks or comments are permitted). - # TODO proper SQL escaping on ALL the things D: - - tempSqlFile=$(mktemp /tmp/mysql-first-time.XXXXXX.sql) - cat > "$tempSqlFile" <<-EOSQL - -- What's done in this file shouldn't be replicated - -- or products like mysql-fabric won't work - SET @@SESSION.SQL_LOG_BIN=0; - - DELETE FROM mysql.user ; - CREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ; - GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ; - DROP DATABASE IF EXISTS test ; - EOSQL - - if [ "$MYSQL_DATABASE" ]; then - echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` ;" >> "$tempSqlFile" - fi - - if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then - echo "CREATE USER '"$MYSQL_USER"'@'%' IDENTIFIED BY '"$MYSQL_PASSWORD"' ;" >> "$tempSqlFile" - - if [ "$MYSQL_DATABASE" ]; then - echo "GRANT ALL ON \`"$MYSQL_DATABASE"\`.* TO '"$MYSQL_USER"'@'%' ;" >> "$tempSqlFile" - fi - fi - - echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile" - - mysql -uroot < "$tempSqlFile" - - rm -f "$tempSqlFile" - kill $(cat $PIDFILE) - for i in $(seq 30 -1 0); do - [ -f "$PIDFILE" ] || break - echo 'MySQL init process in progress...' - sleep 1 - done - if [ $i = 0 ]; then - echo >&2 'MySQL hangs during init process.' - exit 1 - fi - echo 'MySQL init process done. Ready for start up.' -fi - -chown -R mysql:mysql "$DATADIR" - -mysqld & - -sleep 5 - -# ------------------------ - -echo starting postfix -/etc/init.d/postfix restart - -echo starting redis -redis-server & - -echo starting react processor -cd /go/src/github.com/mattermost/platform/web/react && npm start & - -echo starting go web server -cd /go/src/github.com/mattermost/platform/; go run mattermost.go -config=config_docker.json & - -echo starting compass watch -cd /go/src/github.com/mattermost/platform/web/sass-files && compass watch diff --git a/docker/0.5/main.cf b/docker/0.5/main.cf deleted file mode 100644 index ed97d37ef..000000000 --- a/docker/0.5/main.cf +++ /dev/null @@ -1,28 +0,0 @@ -myorigin = mattermost.com -myhostname = mattermost.com - -smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) -biff = no - -append_dot_mydomain = no - -readme_directory = no - -# TLS parameters -smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key -smtpd_use_tls=no -smtp_use_tls=no -smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache -smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache - -smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination -alias_maps = hash:/etc/aliases -alias_database = hash:/etc/aliases -mydestination = localhost, localhost.localdomain, localhost -relayhost = -mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 -mailbox_size_limit = 0 -recipient_delimiter = + -inet_interfaces = all -inet_protocols = all diff --git a/docker/0.6/Dockerrun.aws.zip b/docker/0.6/Dockerrun.aws.zip Binary files differdeleted file mode 100644 index 342c1549a..000000000 --- a/docker/0.6/Dockerrun.aws.zip +++ /dev/null diff --git a/docker/0.6/config_docker.json b/docker/0.6/config_docker.json deleted file mode 100644 index b1c72c4bd..000000000 --- a/docker/0.6/config_docker.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "LogSettings": { - "ConsoleEnable": false, - "ConsoleLevel": "DEBUG", - "FileEnable": true, - "FileLevel": "INFO", - "FileFormat": "", - "FileLocation": "" - }, - "ServiceSettings": { - "SiteName": "Mattermost", - "Mode" : "dev", - "AllowTesting" : false, - "UseSSL": false, - "Port": "80", - "Version": "developer", - "Shards": { - }, - "InviteSalt": "gxHVDcKUyP2y1eiyW8S8na1UYQAfq6J6", - "PublicLinkSalt": "TO3pTyXIZzwHiwyZgGql7lM7DG3zeId4", - "ResetSalt": "IPxFzSfnDFsNsRafZxz8NaYqFKhf9y2t", - "AnalyticsUrl": "", - "UseLocalStorage": true, - "StorageDirectory": "/mattermost/data/", - "AllowedLoginAttempts": 10 - }, - "SSOSettings": { - "gitlab": { - "Allow": false, - "Secret" : "", - "Id": "", - "AuthEndpoint": "", - "TokenEndpoint": "", - "UserApiEndpoint": "" - } - }, - "SqlSettings": { - "DriverName": "mysql", - "DataSource": "mmuser:mostest@tcp(localhost:3306)/mattermost_test?charset=utf8mb4,utf8", - "DataSourceReplicas": ["mmuser:mostest@tcp(localhost:3306)/mattermost_test?charset=utf8mb4,utf8"], - "MaxIdleConns": 10, - "MaxOpenConns": 10, - "Trace": false, - "AtRestEncryptKey": "Ya0xMrybACJ3sZZVWQC7e31h5nSDWZFS" - }, - "AWSSettings": { - "S3AccessKeyId": "", - "S3SecretAccessKey": "", - "S3Bucket": "", - "S3Region": "" - }, - "ImageSettings": { - "ThumbnailWidth": 120, - "ThumbnailHeight": 100, - "PreviewWidth": 1024, - "PreviewHeight": 0, - "ProfileWidth": 128, - "ProfileHeight": 128, - "InitialFont": "luximbi.ttf" - }, - "EmailSettings": { - "ByPassEmail" : true, - "SMTPUsername": "", - "SMTPPassword": "", - "SMTPServer": "", - "UseTLS": false, - "UseStartTLS": false, - "FeedbackEmail": "", - "FeedbackName": "", - "ApplePushServer": "", - "ApplePushCertPublic": "", - "ApplePushCertPrivate": "" - }, - "RateLimitSettings": { - "UseRateLimiter": true, - "PerSec": 10, - "MemoryStoreSize": 10000, - "VaryByRemoteAddr": true, - "VaryByHeader": "" - }, - "PrivacySettings": { - "ShowEmailAddress": true, - "ShowPhoneNumber": true, - "ShowSkypeId": true, - "ShowFullName": true - }, - "TeamSettings": { - "MaxUsersPerTeam": 150, - "AllowPublicLink": true, - "AllowValetDefault": false, - "TermsLink": "/static/help/configure_links.html", - "PrivacyLink": "/static/help/configure_links.html", - "AboutLink": "/static/help/configure_links.html", - "HelpLink": "/static/help/configure_links.html", - "ReportProblemLink": "/static/help/configure_links.html", - "TourLink": "/static/help/configure_links.html", - "DefaultThemeColor": "#2389D7" - } -} diff --git a/docker/0.6/Dockerfile b/docker/1.0/Dockerfile index 35ba0bd7e..3d7c36f31 100644 --- a/docker/0.6/Dockerfile +++ b/docker/1.0/Dockerfile @@ -13,8 +13,6 @@ ENV MYSQL_DATABASE=mattermost_test RUN groupadd -r mysql && useradd -r -g mysql mysql -RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf /var/lib/apt/lists/* - RUN apt-key adv --keyserver pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 ENV MYSQL_MAJOR 5.6 @@ -24,7 +22,7 @@ RUN echo "deb http://repo.mysql.com/apt/debian/ wheezy mysql-${MYSQL_MAJOR}" > / RUN apt-get update \ && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install mysql-server \ + && apt-get -y install perl wget mysql-server \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql @@ -36,8 +34,8 @@ VOLUME /var/lib/mysql WORKDIR /mattermost # Copy over files -ADD https://github.com/mattermost/platform/releases/download/v0.6.0/mattermost.tar.gz / -RUN tar -zxvf /mattermost.tar.gz --strip-components=1 +ADD https://github.com/mattermost/platform/releases/download/v1.0.0-rc1/mattermost.tar.gz / +RUN tar -zxvf /mattermost.tar.gz --strip-components=1 && rm /mattermost.tar.gz ADD config_docker.json / ADD docker-entry.sh / diff --git a/docker/1.0/Dockerrun.aws.zip b/docker/1.0/Dockerrun.aws.zip Binary files differnew file mode 100644 index 000000000..8c2c16e10 --- /dev/null +++ b/docker/1.0/Dockerrun.aws.zip diff --git a/docker/0.6/Dockerrun.aws/.ebextensions/01_files.config b/docker/1.0/Dockerrun.aws/.ebextensions/01_files.config index 7f40a8b34..7f40a8b34 100644 --- a/docker/0.6/Dockerrun.aws/.ebextensions/01_files.config +++ b/docker/1.0/Dockerrun.aws/.ebextensions/01_files.config diff --git a/docker/0.6/Dockerrun.aws/Dockerrun.aws.json b/docker/1.0/Dockerrun.aws/Dockerrun.aws.json index f6f7cf726..9fdded15e 100755 --- a/docker/0.6/Dockerrun.aws/Dockerrun.aws.json +++ b/docker/1.0/Dockerrun.aws/Dockerrun.aws.json @@ -1,7 +1,7 @@ {
"AWSEBDockerrunVersion": "1",
"Image": {
- "Name": "mattermost/platform:0.6",
+ "Name": "mattermost/platform:1.0",
"Update": "true"
},
"Ports": [
diff --git a/docker/1.0/config_docker.json b/docker/1.0/config_docker.json new file mode 100644 index 000000000..06fee9bd5 --- /dev/null +++ b/docker/1.0/config_docker.json @@ -0,0 +1,89 @@ +{ + "ServiceSettings": { + "ListenAddress": ":80", + "MaximumLoginAttempts": 10, + "SegmentDeveloperKey": "", + "GoogleDeveloperKey": "", + "EnableOAuthServiceProvider": false, + "EnableIncomingWebhooks": false, + "EnableTesting": false + }, + "TeamSettings": { + "SiteName": "Mattermost", + "MaxUsersPerTeam": 50, + "EnableTeamCreation": true, + "EnableUserCreation": true, + "RestrictCreationToDomains": "" + }, + "SqlSettings": { + "DriverName": "mysql", + "DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8", + "DataSourceReplicas": [], + "MaxIdleConns": 10, + "MaxOpenConns": 10, + "Trace": false, + "AtRestEncryptKey": "7rAh6iwQCkV4cA1Gsg3fgGOXJAQ43QV" + }, + "LogSettings": { + "EnableConsole": false, + "ConsoleLevel": "INFO", + "EnableFile": true, + "FileLevel": "INFO", + "FileFormat": "", + "FileLocation": "" + }, + "FileSettings": { + "DriverName": "local", + "Directory": "/mattermost/data/", + "EnablePublicLink": true, + "PublicLinkSalt": "LhaAWC6lYEKHTkBKsvyXNIOfUIT37AX", + "ThumbnailWidth": 120, + "ThumbnailHeight": 100, + "PreviewWidth": 1024, + "PreviewHeight": 0, + "ProfileWidth": 128, + "ProfileHeight": 128, + "InitialFont": "luximbi.ttf", + "AmazonS3AccessKeyId": "", + "AmazonS3SecretAccessKey": "", + "AmazonS3Bucket": "", + "AmazonS3Region": "" + }, + "EmailSettings": { + "EnableSignUpWithEmail": true, + "SendEmailNotifications": false, + "RequireEmailVerification": false, + "FeedbackName": "", + "FeedbackEmail": "", + "SMTPUsername": "", + "SMTPPassword": "", + "SMTPServer": "", + "SMTPPort": "", + "ConnectionSecurity": "", + "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9Yo", + "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5e", + "ApplePushServer": "", + "ApplePushCertPublic": "", + "ApplePushCertPrivate": "" + }, + "RateLimitSettings": { + "EnableRateLimiter": true, + "PerSec": 10, + "MemoryStoreSize": 10000, + "VaryByRemoteAddr": true, + "VaryByHeader": "" + }, + "PrivacySettings": { + "ShowEmailAddress": true, + "ShowFullName": true + }, + "GitLabSettings": { + "Enable": false, + "Secret": "", + "Id": "", + "Scope": "", + "AuthEndpoint": "", + "TokenEndpoint": "", + "UserApiEndpoint": "" + } +}
\ No newline at end of file diff --git a/docker/0.6/docker-entry.sh b/docker/1.0/docker-entry.sh index ce9f91c40..ce9f91c40 100755 --- a/docker/0.6/docker-entry.sh +++ b/docker/1.0/docker-entry.sh diff --git a/model/version.go b/model/version.go index 8f0c76ebe..233fc3747 100644 --- a/model/version.go +++ b/model/version.go @@ -12,7 +12,7 @@ import ( // It should be maitained in chronological order with most current // release at the front of the list. var versions = []string{ - "0.8.0", + "1.0.0", "0.7.1", "0.7.0", "0.6.0", diff --git a/model/version_test.go b/model/version_test.go index da40006be..24dbedaa6 100644 --- a/model/version_test.go +++ b/model/version_test.go @@ -36,7 +36,7 @@ func TestSplitVersion(t *testing.T) { } func TestGetPreviousVersion(t *testing.T) { - if major, minor := GetPreviousVersion("0.8.0"); major != 0 || minor != 7 { + if major, minor := GetPreviousVersion("1.0.0"); major != 0 || minor != 7 { t.Fatal(major, minor) } diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index 1e10c5592..eaea15b8f 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -12,7 +12,7 @@ export default class GitLabSettings extends React.Component { this.handleSubmit = this.handleSubmit.bind(this); this.state = { - Allow: this.props.config.GitLabSettings.Allow, + Enable: this.props.config.GitLabSettings.Enable, saveNeeded: false, serverError: null }; @@ -21,12 +21,12 @@ export default class GitLabSettings extends React.Component { handleChange(action) { var s = {saveNeeded: true, serverError: this.state.serverError}; - if (action === 'AllowTrue') { - s.Allow = true; + if (action === 'EnableTrue') { + s.Enable = true; } - if (action === 'AllowFalse') { - s.Allow = false; + if (action === 'EnableFalse') { + s.Enable = false; } this.setState(s); @@ -37,7 +37,7 @@ export default class GitLabSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.GitLabSettings.Allow = React.findDOMNode(this.refs.Allow).checked; + config.GitLabSettings.Enable = React.findDOMNode(this.refs.Enable).checked; config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim(); config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim(); config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); @@ -88,7 +88,7 @@ export default class GitLabSettings extends React.Component { <div className='form-group'> <label className='control-label col-sm-4' - htmlFor='Allow' + htmlFor='Enable' > {'Enable Sign Up With GitLab: '} </label> @@ -96,21 +96,21 @@ export default class GitLabSettings extends React.Component { <label className='radio-inline'> <input type='radio' - name='Allow' + name='Enable' value='true' - ref='Allow' - defaultChecked={this.props.config.GitLabSettings.Allow} - onChange={this.handleChange.bind(this, 'AllowTrue')} + ref='Enable' + defaultChecked={this.props.config.GitLabSettings.Enable} + onChange={this.handleChange.bind(this, 'EnableTrue')} /> {'true'} </label> <label className='radio-inline'> <input type='radio' - name='Allow' + name='Enable' value='false' - defaultChecked={!this.props.config.GitLabSettings.Allow} - onChange={this.handleChange.bind(this, 'AllowFalse')} + defaultChecked={!this.props.config.GitLabSettings.Enable} + onChange={this.handleChange.bind(this, 'EnableFalse')} /> {'false'} </label> @@ -134,7 +134,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"' defaultValue={this.props.config.GitLabSettings.Secret} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} /> <p className='help-text'>{'Obtain this value via the instructions above for logging into GitLab.'}</p> </div> @@ -156,7 +156,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"' defaultValue={this.props.config.GitLabSettings.Id} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} /> <p className='help-text'>{'Obtain this value via the instructions above for logging into GitLab'}</p> </div> @@ -178,7 +178,7 @@ export default class GitLabSettings extends React.Component { placeholder='Not currently used by GitLab. Please leave blank' defaultValue={this.props.config.GitLabSettings.Scope} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} /> <p className='help-text'>{'This field is not yet used by GitLab OAuth. Other OAuth providers may use this field to specify the scope of account data from OAuth provider that is sent to Mattermost.'}</p> </div> @@ -200,7 +200,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.AuthEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} /> <p className='help-text'>{'Enter <your-gitlab-url>/oauth/authorize (example http://localhost:3000/oauth/authorize).'}</p> </div> @@ -222,7 +222,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.TokenEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} /> <p className='help-text'>{'Enter <your-gitlab-url>/oauth/token.'}</p> </div> @@ -244,7 +244,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.UserApiEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} /> <p className='help-text'>{'Enter <your-gitlab-url>/api/v3/user.'}</p> </div> |